/ /   = = P R E P R O C E S S O R = = 
 
 / /   @ n a m e   " P r o p e r t i e s   &   p r o p e r t i e s   f i l e   ( m l ) " 
 
 / /   @ a u t h o r   " k g e n a _ u a " 
 
 / /   @ v e r s i o n   " 0 4 1 1 2 0 1 8 " 
 
 / /   @ f e a t u r e   " v 1 . 4 " 
 
 / /   @ f e a t u r e   " w a t c h - m e t a d b " 
 
 / /   @ t o o l t i p   " c u s t o m - p a i n t " 
 
 / /   = = / P R E P R O C E S S O R = = 
 
 
 
 f u n c t i o n   R G B ( r , g , b )   {   r e t u r n   ( 0 x f f 0 0 0 0 0 0 | ( r < < 1 6 ) | ( g < < 8 ) | ( b ) ) ;   } 
 
 f u n c t i o n   R G B A ( r , g , b , a )   {   r e t u r n   ( ( a   < <   2 4 )   |   ( r   < <   1 6 )   |   ( g   < <   8 )   |   ( b ) ) ;   } 
 
 f u n c t i o n   g e t R e d ( c o l o r )   { r e t u r n   ( ( c o l o r   > >   1 6 )   &   0 x f f ) ; } ; 
 
 f u n c t i o n   g e t G r e e n ( c o l o r )   { r e t u r n   ( ( c o l o r   > >   8 )   &   0 x f f ) ; } ; 
 
 f u n c t i o n   g e t B l u e ( c o l o r )   { r e t u r n   ( c o l o r   &   0 x f f ) ; } ; 
 
 
 
 D T _ L E F T   =   0 x 0 0 0 0 0 0 0 0 ; 
 
 D T _ R I G H T   =   0 x 0 0 0 0 0 0 0 2 ; 
 
 D T _ C E N T E R   =   0 x 0 0 0 0 0 0 0 1 ; 
 
 D T _ V C E N T E R   =   0 x 0 0 0 0 0 0 0 4 ; 
 
 D T _ S I N G L E L I N E   =   0 x 0 0 0 0 0 0 2 0 ; 
 
 D T _ W O R D _ E L L I P S I S   =   0 x 0 0 0 4 0 0 0 0 ; 
 
 D T _ W O R D B R E A K   =   0 x 0 0 0 0 0 0 1 0 ; 
 
 D T _ C A L C R E C T   =   0 x 0 0 0 0 0 4 0 0 ; 
 
 D T _ N O P R E F I X   =   0 x 0 0 0 0 0 8 0 0 ; 
 
 
 
 v a r   w w ,   w h ;   
 
 
 
 I D C _ H A N D   =   3 2 6 4 9 ; 
 
 I D C _ A R R O W   =   3 2 5 1 2 ; 
 
 I D C _ S I Z E W E   =   3 2 6 4 4 ; 
 
 
 
 M F _ E N A B L E D   =   0 x 0 0 0 0 0 0 0 0 ; 
 
 M F _ G R A Y E D   =   0 x 0 0 0 0 0 0 0 1 ; 
 
 M F _ S E P A R A T O R   =   0 x 0 0 0 0 0 8 0 0 ; 
 
 
 
 V K _ S H I F T   =   0 x 1 0 ; 
 
 V K _ C O N T R O L   =   0 x 1 1 ; 
 
 V K _ E S C A P E   =   0 x 1 B ; 
 
 
 
 S t r i n g . p r o t o t y p e . r e p e a t   =   f u n c t i o n ( n )   { 
 
         r e t u r n   n e w   A r r a y ( n   +   1 ) . j o i n ( t h i s ) ; 
 
 } 
 
 
 
 w i n d o w . S e t P r o p e r t y ( "   -   u s e r " ,   " " ) ; 
 
 i f   ( w i n d o w . G e t P r o p e r t y ( "   -   u s e r " )   ! =   " "   )   w i n d o w . S e t P r o p e r t y ( "   -   u s e r " ,   " " ) ; 
 
 w i n d o w . S e t P r o p e r t y ( " - " . r e p e a t ( 5 0 ) ,   " " ) ; 
 
 i f   ( w i n d o w . G e t P r o p e r t y ( " - " . r e p e a t ( 5 0 ) )   ! =   " "   )   w i n d o w . S e t P r o p e r t y ( " - " . r e p e a t ( 5 0 ) ,   " " ) ; 
 
 
 
 v a r   f o n t _ n a m e _ i t e m _ n a m e   =   w i n d o w . G e t P r o p e r t y ( "   f o n t   n a m e :   i t e m   n a m e " ,   " A r i a l " ) ; 
 
 v a r   f o n t _ n a m e _ i t e m _ v a l u e   =   w i n d o w . G e t P r o p e r t y ( "   f o n t   n a m e :   i t e m   v a l u e " ,   " A r i a l " ) ; 
 
 v a r   f o n t _ n a m e _ g r o u p   =   w i n d o w . G e t P r o p e r t y ( "   f o n t   n a m e :   g r o u p " ,   " A r i a l " ) ; 
 
 
 
 v a r   f o n t _ s i z e _ i t e m _ n a m e   =   w i n d o w . G e t P r o p e r t y ( "   f o n t   s i z e :   i t e m   n a m e " ,   1 1 ) ; 
 
 v a r   f o n t _ s i z e _ i t e m _ v a l u e   =   w i n d o w . G e t P r o p e r t y ( "   f o n t   s i z e :   i t e m   v a l u e " ,   1 1 ) ; 
 
 v a r   f o n t _ s i z e _ g r o u p   =   w i n d o w . G e t P r o p e r t y ( "   f o n t   s i z e :   g r o u p " ,   1 1 ) ; 
 
 
 
 v a r   f o n t _ s t y l e _ i t e m _ n a m e   =   w i n d o w . G e t P r o p e r t y ( "   f o n t   s t y l e :   i t e m   n a m e " ,   0 ) ; 
 
 v a r   f o n t _ s t y l e _ i t e m _ v a l u e   =   w i n d o w . G e t P r o p e r t y ( "   f o n t   s t y l e :   i t e m   v a l u e " ,   0 ) ; 
 
 v a r   f o n t _ s t y l e _ g r o u p   =   w i n d o w . G e t P r o p e r t y ( "   f o n t   s t y l e :   g r o u p " ,   0 ) ; 
 
 
 
 v a r   f o n t _ s i z e _ t o o l t i p   =   w i n d o w . G e t P r o p e r t y ( "   f o n t   s i z e :   t o o l t i p " ,   1 1 ) ; 
 
 
 
 v a r   f o n t _ i t e m ,   f o n t _ g r o u p ,   f o n t _ t o o l t i p ; 
 
 g e t _ f o n t ( ) ; 
 
 
 
 f u n c t i o n   g e t _ f o n t ( ) { 
 
         f o n t _ i t e m _ n a m e   =   g d i . F o n t ( f o n t _ n a m e _ i t e m _ n a m e ,   f o n t _ s i z e _ i t e m _ n a m e ,   f o n t _ s t y l e _ i t e m _ n a m e ) ; 
 
         f o n t _ i t e m _ v a l u e   =   g d i . F o n t ( f o n t _ n a m e _ i t e m _ v a l u e ,   f o n t _ s i z e _ i t e m _ v a l u e ,   f o n t _ s t y l e _ i t e m _ v a l u e ) ; 
 
         f o n t _ g r o u p   =   g d i . F o n t ( f o n t _ n a m e _ g r o u p ,   f o n t _ s i z e _ g r o u p ,   f o n t _ s t y l e _ g r o u p ) ; 
 
         f o n t _ t o o l t i p   =   g d i . F o n t ( f o n t _ n a m e _ i t e m _ v a l u e ,   f o n t _ s i z e _ t o o l t i p ,   f o n t _ s t y l e _ i t e m _ v a l u e ) ; 
 
 } 
 
 
 
 C o l o r T y p e C U I   =   { 
 
         t e x t :   0 , 
 
         s e l e c t i o n _ t e x t :   1 , 
 
         i n a c t i v e _ s e l e c t i o n _ t e x t :   2 , 
 
         b a c k g r o u n d :   3 , 
 
         s e l e c t i o n _ b a c k g r o u n d :   4 , 
 
         i n a c t i v e _ s e l e c t i o n _ b a c k g r o u n d :   5 , 
 
         a c t i v e _ i t e m _ f r a m e :   6 
 
 } ; 
 
 
 
 C o l o r T y p e D U I   =   { 
 
       t e x t :   0 , 
 
       b a c k g r o u n d :   1 , 
 
       h i g h l i g h t :   2 , 
 
       s e l e c t i o n :   3 
 
 } ; 
 
 
 
 v a r   b g c o l o r ,   b g c o l o r _ i n v ,   c o l o r _ i t e m _ n a m e ,   c o l o r _ i t e m _ v a l u e ,   c o l o r _ g r o u p _ t e x t ,   c o l o r _ s c r o l l b a r ; 
 
 
 
 f u n c t i o n   g e t _ c o l o r ( ) {   
 
         t r y   {   	 
 
                 i f   ( w i n d o w . I n s t a n c e T y p e   = =   0 ) { 	 	 	 	 	 	 	 
 
                         s _ b g c o l o r   =   w i n d o w . G e t C o l o r C U I ( C o l o r T y p e C U I . b a c k g r o u n d ) ; 
 
                         s _ c o l o r _ i t e m _ n a m e   =   w i n d o w . G e t C o l o r C U I ( C o l o r T y p e C U I . t e x t ) ; 
 
                         s _ c o l o r _ i t e m _ v a l u e   =   w i n d o w . G e t C o l o r C U I ( C o l o r T y p e C U I . i n a c t i v e _ s e l e c t i o n _ t e x t ) ; 
 
                         s _ c o l o r _ g r o u p _ t e x t   =   w i n d o w . G e t C o l o r C U I ( C o l o r T y p e C U I . i n a c t i v e _ s e l e c t i o n _ b a c k g r o u n d ) ; 	 
 
                 }   e l s e   i f   ( w i n d o w . I n s t a n c e T y p e   = =   1 )   {   	 	 	 	 	 	 	 
 
                         s _ b g c o l o r   =   w i n d o w . G e t C o l o r D U I ( C o l o r T y p e D U I . b a c k g r o u n d ) ; 
 
                         s _ c o l o r _ i t e m _ n a m e   =   w i n d o w . G e t C o l o r D U I ( C o l o r T y p e D U I . t e x t ) ; 
 
                         s _ c o l o r _ i t e m _ v a l u e   =   w i n d o w . G e t C o l o r D U I ( C o l o r T y p e D U I . h i g h l i g h t ) ; 
 
                         s _ c o l o r _ g r o u p _ t e x t   =   w i n d o w . G e t C o l o r D U I ( C o l o r T y p e D U I . s e l e c t i o n ) ; 	 	 	 	 	 	 
 
                 } 	 
 
         }   c a t c h ( e ) { } ; 
 
         t r y   {   	 
 
                 i f   ( w i n d o w . I n s t a n c e T y p e   = =   0 ) { 	 	 	 	 	 	 	 
 
                         s _ b g c o l o r   =   w i n d o w . G e t C o l o u r C U I ( C o l o r T y p e C U I . b a c k g r o u n d ) ; 
 
                         s _ c o l o r _ i t e m _ n a m e   =   w i n d o w . G e t C o l o u r C U I ( C o l o r T y p e C U I . t e x t ) ; 
 
                         s _ c o l o r _ i t e m _ v a l u e   =   w i n d o w . G e t C o l o u r C U I ( C o l o r T y p e C U I . i n a c t i v e _ s e l e c t i o n _ t e x t ) ; 
 
                         s _ c o l o r _ g r o u p _ t e x t   =   w i n d o w . G e t C o l o u r C U I ( C o l o r T y p e C U I . i n a c t i v e _ s e l e c t i o n _ b a c k g r o u n d ) ; 	 
 
                 }   e l s e   i f   ( w i n d o w . I n s t a n c e T y p e   = =   1 )   {   	 	 	 	 	 	 	 
 
                         s _ b g c o l o r   =   w i n d o w . G e t C o l o u r D U I ( C o l o r T y p e D U I . b a c k g r o u n d ) ; 
 
                         s _ c o l o r _ i t e m _ n a m e   =   w i n d o w . G e t C o l o u r D U I ( C o l o r T y p e D U I . t e x t ) ; 
 
                         s _ c o l o r _ i t e m _ v a l u e   =   w i n d o w . G e t C o l o u r D U I ( C o l o r T y p e D U I . h i g h l i g h t ) ; 
 
                         s _ c o l o r _ g r o u p _ t e x t   =   w i n d o w . G e t C o l o u r D U I ( C o l o r T y p e D U I . s e l e c t i o n ) ; 	 	 	 	 	 	 
 
                 } 	 	 	 	 	 	 	 
 
         }   c a t c h ( e ) { } ; 
 
         w i n d o w . R e p a i n t ( ) ; 	 
 
 } 
 
 
 
 v a r   c _ b g c o l o r   =   c u s t o m C o l o r ( w i n d o w . G e t P r o p e r t y ( "   c o l o r :   b a c k g r o u n d " ,   " 2 2 0 - 2 2 0 - 2 2 0 " ) ) ; 
 
 v a r   c _ c o l o r _ i t e m _ n a m e   =   c u s t o m C o l o r ( w i n d o w . G e t P r o p e r t y ( "   c o l o r :   i t e m   n a m e " ,   " 2 0 - 2 0 - 2 0 " ) ) ;   / /   
 
 v a r   c _ c o l o r _ i t e m _ v a l u e   =   c u s t o m C o l o r ( w i n d o w . G e t P r o p e r t y ( "   c o l o r :   i t e m   v a l u e " ,   " 2 0 - 2 0 - 2 0 " ) ) ;   / / 
 
 v a r   c _ c o l o r _ g r o u p _ t e x t   =   c u s t o m C o l o r ( w i n d o w . G e t P r o p e r t y ( "   c o l o r :   g r o u p   t e x t " ,   " 1 0 0 - 1 0 0 - 1 0 0 " ) ) ; 
 
 
 
 f u n c t i o n   c u s t o m C o l o r ( c o l o u r ) { 
 
       t e m p c   =   c o l o u r . s p l i t ( " - " ) ; 
 
       r e t u r n   ( 0 x f f 0 0 0 0 0 0   |   ( t e m p c [ 0 ] < < 1 6 )   |   ( t e m p c [ 1 ] < < 8 )   |   ( t e m p c [ 2 ] ) ) ; 
 
 } 
 
 
 
 v a r   c u s t o m _ c o l o r s   =   w i n d o w . G e t P r o p e r t y ( "   c o l o r s :   c u s t o m " ,   f a l s e ) ; 
 
 
 
 g e t _ c o l o r ( ) ; 
 
 i n i _ c o l o r ( ) ; 
 
 
 
 f u n c t i o n   o n _ c o l o r s _ c h a n g e d ( ) { 
 
         g e t _ c o l o r ( ) ; 
 
         i n i _ c o l o r ( ) ; 
 
 } 
 
 
 
 f u n c t i o n   i n i _ c o l o r ( ) { 
 
         b g c o l o r   =   c u s t o m _ c o l o r s   ?   c _ b g c o l o r   :   s _ b g c o l o r ; 
 
         c o l o r _ i t e m _ n a m e   =   c u s t o m _ c o l o r s   ?   c _ c o l o r _ i t e m _ n a m e   :   s _ c o l o r _ i t e m _ n a m e ; 
 
         c o l o r _ i t e m _ v a l u e   =   c u s t o m _ c o l o r s   ?   c _ c o l o r _ i t e m _ v a l u e   :   s _ c o l o r _ i t e m _ v a l u e ; 
 
         c o l o r _ g r o u p _ t e x t   =   c u s t o m _ c o l o r s   ?   c _ c o l o r _ g r o u p _ t e x t   :   s _ c o l o r _ g r o u p _ t e x t ; 
 
         c o l o r _ s c r o l l b a r   =   R G B A ( g e t R e d ( c o l o r _ g r o u p _ t e x t ) ,   g e t G r e e n ( c o l o r _ g r o u p _ t e x t ) ,   g e t B l u e ( c o l o r _ g r o u p _ t e x t ) ,   1 5 0 ) ; 
 
         b g c o l o r _ H S V   =   R G B t o H S V ( g e t R e d ( b g c o l o r ) ,   g e t G r e e n ( b g c o l o r ) ,   g e t B l u e ( b g c o l o r ) ) ; 
 
         b g c o l o r _ i n v   =   H S V t o R G B ( b g c o l o r _ H S V . H ,   b g c o l o r _ H S V . S ,   1 0 0   -   b g c o l o r _ H S V . V ) ; 
 
 } 
 
 
 
 v a r   s e l e c t i o n _ m o d e   =   w i n d o w . G e t P r o p e r t y ( " s e l e c t i o n _ m o d e " ,   0 ) ; 
 
 
 
 v a r   i d x   =   0 ,   o l d _ i d x   =   0 ; 
 
 v a r   i t e m _ n a m e _ a r r a y _ 0   =   [ ] ; 
 
 v a r   i t e m _ n a m e _ a r r a y _ 1   =   [ ] ; 
 
 v a r   i t e m _ v a l u e _ a r r a y   =   [ ] ; 
 
 v a r   t m p _ i t e m _ n a m e _ a r r a y _ 0   =   [ ] ; 
 
 v a r   t m p _ i t e m _ n a m e _ a r r a y _ 1   =   [ ] ; 
 
 v a r   t m p _ i t e m _ v a l u e _ a r r a y   =   [ ] ; 
 
 v a r   n a m e ,   v a l u e ; 
 
 v a r   a r t i s t ,   o l d _ a r t i s t ; 
 
 v a r   a l b u m ,   o l d _ a l b u m ; 
 
 v a r   s i m i l a r ; 
 
 v a r   s i m i l a r _ a r t i s t   =   [ ] ; 
 
 v a r   a r t i s t _ i n f o   =   [ ] ; 
 
 v a r   a l b u m _ i n f o   =   [ ] ; 
 
 
 
 v a r   a u t o _ s i z i n g   =   w i n d o w . G e t P r o p e r t y ( " a u t o   s i z i n g " ,   t r u e ) ; 
 
 v a r   g r o u p _ t e x t   =   w i n d o w . G e t P r o p e r t y ( " g r o u p   t e x t " ,   t r u e ) ; 
 
 v a r   v e r t i c a l _ i t e m _ p a d d i n g   =   w i n d o w . G e t P r o p e r t y ( "   v e r t i c a l   i t e m   p a d d i n g " ,   1 ) ; 
 
 v a r   c l i p b o a r d _ i t e m _ n a m e   =   w i n d o w . G e t P r o p e r t y ( " c l i p b o a r d   i t e m   n a m e " ,   f a l s e ) ; 
 
 
 
 v a r   l i n e _ h e i g h t   =   0 ; 
 
 v a r   m a r g i n _ h   =   w i n d o w . G e t P r o p e r t y ( "   t e x t :   m a r g i n " ,   1 0 ) ; 
 
 v a r   t _ x 1   =   m a r g i n _ h ; 
 
 v a r   t _ x 2   =   0 ; 
 
 v a r   t e x t _ h e i g h t   =   0 ; 
 
 v a r   p a n e l _ h e i g h t   =   0 ; 
 
 w i n d o w . G e t P r o p e r t y ( " t e x t :   x 2   c u s t o m " ,   0 ) ; 
 
 
 
 v a r   l b t n _ d o w n   =   f a l s e ; 
 
 v a r   s h i f t _ d o w n   =   f a l s e ; 
 
 v a r   c o n t r o l _ d o w n   =   f a l s e ; 
 
 v a r   p o s _ x   =   0 ; 
 
 v a r   d r a g _ x   =   0 ,   d r a g _ y   =   0 ; 
 
 v a r   m o v e _ x   =   f a l s e ,     m o v e _ y   =   f a l s e ; 
 
 v a r   o l d _ x   =   0 ,   o l d _ y   =   0 ; 
 
 
 
 v a r   s c r o l l   =   0 ,   s c r o l l _   =   0 ,   s c r o l l _ _   =   0 ,   s c r o l l _ _ _   =   0 ; 	 	 	 
 
 v a r   t i m e r ; 
 
 v a r   s c r o l l _ t i m e r _ o n   =   f a l s e ; 
 
 v a r   s c r o l l _ d i r ; 
 
 v a r   s c r o l l b a r   =   w i n d o w . G e t P r o p e r t y ( "   s c r o l l b a r " ,   f a l s e ) ; 
 
 v a r   s c r o l l b a r _ w   =   w i n d o w . G e t P r o p e r t y ( "   s c r o l l b a r   w i d t h " ,   3 ) ; 
 
 s c r o l l b a r _ w   =   s c r o l l b a r   ?   s c r o l l b a r _ w   :   0 ; 
 
 
 
 v a r   T o o l t i p   =   w i n d o w . G e t P r o p e r t y ( " t o o l t i p " ,   f a l s e ) ; 
 
 v a r   t o o l t i p _ t i m e   =   f b . C r e a t e P r o f i l e r ( " T i m e   t o o l t i p " ) ; 
 
 v a r   t o o l t i p _ s t a t e   =   f a l s e ; 
 
 v a r   t o o l t i p _ t e x t ; 
 
 v a r   t o o l t i p _ t   =   [ ] ; 
 
 v a r   t o o l t i p _ m a x _ w   =   w i n d o w . G e t P r o p e r t y ( "   t o o l t i p   t e x t   m a x   w i d t h " ,   2 5 0 ) ; 
 
 v a r   t o o l t i p _ d e l a y _ t i m e   =   w i n d o w . G e t P r o p e r t y ( "   t o o l t i p   d e l a y   t i m e   ( m s ) " ,   3 0 0 ) ; 
 
 
 
 v a r   p _ w s h   =   f a l s e ; 
 
 v a r   p _ j s c r i p t   =   f a l s e ; 
 
 
 
 t r y   { 
 
         v a r   t o o l t i p   =   w i n d o w . C r e a t e T o o l t i p ( f o n t _ n a m e _ i t e m _ v a l u e ,   f o n t _ s i z e _ t o o l t i p ,   f o n t _ s t y l e _ i t e m _ v a l u e ) ; 
 
         t o o l t i p . S e t M a x W i d t h ( t o o l t i p _ m a x _ w ) ; 
 
         p _ j s c r i p t   =   t r u e ; 
 
 }   c a t c h ( e )   { p _ j s c r i p t   =   f a l s e } ; 
 
 
 
 i f   ( ! p _ j s c r i p t ) { 
 
         v a r   t o o l t i p   =   w i n d o w . C r e a t e T o o l t i p ( ) ; 
 
         p _ w s h   =   t r u e ; 
 
 } 
 
 
 
 h t m l f i l e   =   n e w   A c t i v e X O b j e c t ( ' h t m l f i l e ' ) ; 
 
 v a r   c l i p b o a r d D a t a   =   " " ; 
 
 v a r   s e l e c t e d _ i d x   =   [ ] ; 
 
 
 
 v a r   d o c   =   n e w   A c t i v e X O b j e c t ( " h t m l f i l e " ) ; 
 
 
 
 p a n e l _ o n   =   t r u e ; 
 
 
 
 f u n c t i o n   o n _ p a i n t ( g r )   { 
 
       ! w i n d o w . I s T r a n s p a r e n t   & &   g r . F i l l S o l i d R e c t ( 0 ,   0 ,   w w ,   w h ,   b g c o l o r ) ; 
 
         
 
         d r a w _ a r r a y ( g r ) ; 
 
         s c r o l l b a r   & &   d r a w _ s c r o l l b a r ( g r ) ; 
 
 } 
 
 
 
 v a r   l a n g _ t e x t   =   [ " e n " ,   " r u " ] ; 
 
 v a r   l a n g   =   w i n d o w . G e t P r o p e r t y ( " l a n g " ,   0 ) ; 
 
 
 
 v a r   g r o u p s   =   [ " m e t a d a t a " ,   " g e n e r a l " ,   " r e p l a y g a i n " ,   " l o c a t i o n " ,   " p l a y b a c k   s t a t i s t i c s " ,   " l a s t . F M   s t a t i s t i c s " ,   " l a s t . F M " ] ; 
 
 
 
 w i n d o w . G e t P r o p e r t y (   g r o u p s [ 0 ] ,   t r u e ) ; 
 
 w i n d o w . G e t P r o p e r t y (   g r o u p s [ 1 ] ,   t r u e ) ; 
 
 w i n d o w . G e t P r o p e r t y (   g r o u p s [ 2 ] ,   t r u e ) ; 
 
 w i n d o w . G e t P r o p e r t y (   g r o u p s [ 3 ] ,   t r u e ) ; 
 
 w i n d o w . G e t P r o p e r t y (   g r o u p s [ 4 ] ,   t r u e ) ; 
 
 w i n d o w . G e t P r o p e r t y (   g r o u p s [ 5 ] ,   t r u e ) ; 
 
 w i n d o w . G e t P r o p e r t y (   g r o u p s [ 6 ] ,   t r u e ) ; 
 
 
 
 v a r   t f n a m e   =   [ 
 
 [ " g r o u p _ "   +   g r o u p s [ 0 ] ,   " <5B040==K5" ] , 
 
 [ " $ m e t a ( a r t i s t ) " ,   " A?>;=8B5;L" ] , 
 
 [ " % t i t l e % " ,   " 0720=85" ] , 
 
 [ " % a l b u m % " ,   " ;L1><" ] , 
 
 [ " % d a t e % " ,   " >4" ] , 
 
 [ " % g e n r e % " ,   " 0=@" ] , 
 
 [ " % c o m p o s e r % " ,   " ><?>78B>@" ] , 
 
 [ " % p e r f o r m e r % " ,   " 5@2K9  8A?>;=8B5;LL" ] ,       
 
 [ " $ m e t a ( a l b u m   a r t i s t ) " ,   " A?>;=8B5;L  0;L1><0" ] , 
 
 [ " % t r a c k   n u m b e r % " ,   " ><5@  B@5:0" ] , 
 
 [ " % t o t a l t r a c k s % " ,   " A53>  B@5:>2" ] , 
 
 [ " % d i s c n u m b e r % " ,   " ><5@  48A:0" ] , 
 
 [ " % t o t a l d i s c s % " ,   " A53>  48A:>2" ] , 
 
 [ " % r a t i n g % " ,   "  59B8=3" ] , 
 
 [ " $ m e t a ( r a t i n g ) " ,   "  59B8=3" ] , 
 
 [ " % c o m m e n t % " ,   " ><<5=B0@89" ] , 
 
 [ " % p u b l i s h e r % " ,   " 740B5;L" ] , 
 
 [ " % c a t a l o g % " ,   " 0B0;>3" ] , 
 
 [ " % d i s c i d % " ,   " I D   48A:0" ] , 
 
 [ " % l a b e l % " ,   " 591;" ] ,                       
 
 [ " % r e l e a s e r % " ,   " @>4025F" ] ,           
 
 [ " % s u b t i t l e % " ,   " !C1B8B@K" ] , 
 
 [ " % s t y l e % " ,   " . . . " ] ,       
 
 [ " % f o r m a t % " ,   " . . . " ] ,       
 
 [ " $ m e t a ( r e l e a s e d ) " ,   " . . . " ] ,       
 
 [ " $ m e t a ( c o p y r i g h t ) " ,   " . . . " ] ,       
 
 [ " % c o u n t r y % " ,   " . . . " ] ,       
 
 
 
 [ " g r o u p _ "   +   g r o u p s [ 1 ] ,   " >1I85" ] ,                       
 
 [ " $ i n f o ( s a m p l e r a t e ) " ,   " '0AB>B0  48A:@5B870F88" ] , 
 
 [ " $ i n f o ( c h a n n e l s ) " ,   " 0=0;>2" ] , 
 
 [ " $ i n f o ( b i t s p e r s a m p l e ) " ,   " 8B  =0  A5<?;" ] , 
 
 [ " $ i n f o ( b i t r a t e ) " ,   " 8B@59B" ] , 
 
 [ " % c o d e c % " ,   " >45:" ] , 
 
 [ " $ i n f o ( c o d e c _ p r o f i l e ) " ,   " @>D8;L  :>45:0" ] , 
 
 [ " $ i n f o ( m p 3 _ s t e r e o _ m o d e ) " ,   "  568<  AB5@5>  M P 3 " ] , 
 
 [ " $ i n f o ( e n c o d i n g ) " ,   " >48@>20=85" ] , 
 
 [ " % l e n g t h % " ,   " ;8=0" ] , 
 
 [ " $ i n f o ( t o o l ) " ,   " >48@>2I8:" ] , 
 
 [ " $ i n f o ( c u e _ e m b e d d e d ) " ,   " AB@>5==K9  C U E " ] , 
 
 [ " $ i n f o ( t a g t y p e ) " ,   " "8?  B530" ] , 
 
 
 
 [ " g r o u p _ "   +   g r o u p s [ 2 ] ,   " CA8;5=85  3@><:>AB8" ] ,   
 
 [ " % r e p l a y g a i n _ a l b u m _ g a i n % " ,   " #A8;5=85  3@><:>AB8  0;L1><0" ] , 
 
 [ " % r e p l a y g a i n _ a l b u m _ p e a k % " ,   " 8:>2K9  C@>25=L  0;L1><0" ] , 
 
 [ " % r e p l a y g a i n _ t r a c k _ g a i n % " ,   " CA8;5=85  3@><:>AB8  B@5:0" ] , 
 
 [ " % r e p l a y g a i n _ t r a c k _ p e a k % " ,   " 8:>2K9  C@>25=L  B@5:0" ] , 
 
 
 
 [ " g r o u p _ "   +   g r o u p s [ 3 ] ,   " @0A?>;>65=85" ] ,       
 
 [ " % f i l e n a m e _ e x t % " ,   " <O  D09;0" ] , 
 
 [ " $ i n f o ( r e f e r e n c e d _ f i l e ) " ,   " . . . " ] , 
 
 [ " $ d i r e c t o r y _ p a t h ( % p a t h % ) " ,   " CBL  :  D09;C" ] , 
 
 [ " % u r l % " ,   " !AK;:0" ] , 
 
 [ " % s u b s o n g % " ,   " >78F8O  B@5:0" ] ,               
 
 [ " % f i l e s i z e _ n a t u r a l % " ,   "  07<5@  D09;0" ] , 
 
 [ " % l a s t _ m o d i f i e d % " ,   " 7<5=5=" ] , 
 
 [ " % f o l d e r _ n a m e % " ,   " <O  ?0?:8" ] , 
 
 
 
 [ " g r o u p _ "   +   g r o u p s [ 4 ] ,   " AB0B8AB8:0  2>A?@>872545=8O" ] , 
 
 [ " % p l a y _ c o u n t % " ,   " >;8G5AB2>  2>A?@>872545=89" ] , 
 
 [ " % f i r s t _ p l a y e d % " ,   " 5@2>5  2>A?@>872545=85" ] , 
 
 [ " % l a s t _ p l a y e d % " ,   " >A;54=55  2>A?@>872545=85" ] , 
 
 [ " % a d d e d % " ,   " >102;5=" ] , 
 
 
 
 [ " g r o u p _ "   +   g r o u p s [ 5 ] ,   " A09B  L a s t . F M " ] , 
 
 [ " % l a s t f m _ b i o % " ,   " 8>3@0D8O" ] , 
 
 [ " % l a s t f m _ a l b u m _ l i s t e n e r s % " ,   " !;CH0B5;59  0;L1><0" ] , 
 
 [ " % l a s t f m _ a l b u m _ p l a y c o u n t % " ,   " @>A;CH820=89  0;L1><0" ] , 
 
 [ " % l a s t f m _ a r t i s t _ l i s t e n e r s % " ,   " !;CH0B5;59  8A?>;=8B5;O" ] , 
 
 [ " % l a s t f m _ a r t i s t _ p l a y c o u n t % " ,   " @>A;CH820=89  8A?>;=8B5;O" ] , 
 
 [ " % l a s t f m _ a l b u m _ c o n t e n t % " ,   " !>45@68<>5  0;L1><0" ] , 
 
 
 
 [ " g r o u p _ "   +   g r o u p s [ 6 ] ,   " A09B  L a s t . F M " ] , 
 
 [ " % l a s t f m _ s i m i l a r _ a r t i s t % " ,   " >E>685  8A?>;=8B5;8" ] 
 
 ] ; 
 
 
 
 v a r   m e a s u r e _ a r r   =   [ 
 
         [ " $ i n f o ( b i t r a t e ) " ,   " k b p s " ,   " :18B/ A" ] , 
 
         [ " $ i n f o ( s a m p l e r a t e ) " ,   " H z " ,   " F" ] , 
 
         [ " $ i n f o ( b i t s p e r s a m p l e ) " ,   " b p s " ,   " " ] , 
 
         [ " $ i n f o ( c h a n n e l s ) " ,   " c h " ,   " " ] , 
 
         [ " % p l a y _ c o u n t % " ,   " t i m e s " ,   " " ] 
 
 ] 
 
 
 
 v a r   t a g _ t e x t _ a r r   =   [ " ( t a g ) " ,   " ( B53) " ] ; 
 
 
 
 f u n c t i o n   g e t _ m e a s u r e ( n )   { 
 
         t m p   =   " " ; 
 
         v a r   j   =   0 ; 
 
         d o   { 
 
                 i f   ( m e a s u r e _ a r r [ j ] [ 0 ]   = =   n )   { 
 
                         t m p   =   l a n g   = =   0   ?   m e a s u r e _ a r r [ j ] [ 1 ]   :   m e a s u r e _ a r r [ j ] [ 2 ] ; 
 
                 }           
 
                 j + + ; 
 
         }   w h i l e   ( j   <   m e a s u r e _ a r r . l e n g t h ) ; 
 
         r e t u r n   t m p ; 
 
 } 
 
 
 
 v a r   m o n t h s _ 0   =   [ " J a n . " ,   " F e b . " ,   " M a r . " ,   " A p r . " ,   " M a y " ,   " J u n . " ,   " J u l . " ,   " A u g . " ,   " S e p t . " ,   " O c t . " ,   " N o v . " ,   " D e c . " ] ; 
 
 v a r   m o n t h s _ 1   =   [ " /=2. " ,   " $52. " ,   " @B" ,   " ?@. " ,   " 09" ,   " N=. " ,   " N;. " ,   " 23. " ,   " !5=. " ,   " :B. " ,   " 1@" ,   " 5:. " ] ; 
 
 
 
 f u n c t i o n   d a t a _ f o r m a t ( n )   { 
 
         i f   ( ! n )   r e t u r n ; 
 
         d   =   p a r s e I n t ( n . s u b s t r ( 8 ,   2 ) ,   1 0 ) ; 
 
         m   =   p a r s e I n t ( n . s u b s t r ( 5 ,   2 ) ,   1 0 ) ; 
 
         y   =   n . s u b s t r ( 0 ,   4 ) ; 
 
         t   =   n . s u b s t r ( 1 1 ,   8 ) ; 
 
         m _ t e x t   =   l a n g   = =   0   ?   m o n t h s _ 0 [ m   -   1 ]   :   m o n t h s _ 1 [ m   -   1 ] ; 
 
         r e t u r n   d   +   "   "   +   m _ t e x t   +   "   "   +   y   +   " ,   "   +   t ; 
 
 } 
 
 
 
 f u n c t i o n   s e t _ c u r s o r ( )   { 
 
         i f   ( m o v e _ y   | |   l b t n _ d o w n )   w i n d o w . S e t C u r s o r ( I D C _ H A N D ) ; 
 
         i f   ( m o v e _ x   & &   p o s _ x   > =   t _ x 2 )   w i n d o w . S e t C u r s o r ( I D C _ S I Z E W E ) ; 
 
           
 
 } 
 
 
 
 f u n c t i o n   o n _ m o u s e _ l b t n _ d o w n ( x ,   y )   { 
 
         d e a c t i v e _ t o o l t i p ( ) ; 
 
         l b t n _ d o w n   =   t r u e ; 
 
         
 
         i f   ( m o v e _ y )   d r a g _ y   =   y   -   s c r o l l ; 
 
         i f   ( m o v e _ x   & &   p o s _ x   > =   t _ x 2 )   d r a g _ x   =   x   -   t _ x 2 ; 
 
       
 
         i f   ( c o n t r o l _ d o w n ) { 
 
                 o l d _ i d x   =   i d x ; 
 
                 s e l e c t e d _ i d x [ i d x ]   =   s e l e c t e d _ i d x [ i d x ]   = =   0   ?   1   :   0 ; 
 
                 c o p y _ t o _ c l i p b o a r d ( ) ; 
 
         } 
 
 } 
 
 
 
 f u n c t i o n   o n _ m o u s e _ l b t n _ u p ( x ,   y )   { 
 
         l b t n _ d o w n   =   f a l s e ; 
 
         i f   ( m o v e _ x )   { 
 
                 w i n d o w . S e t P r o p e r t y ( " t e x t :   x 2   c u s t o m " ,     t _ x 2 ) ; 
 
         } 
 
 
 
         i f   ( m o v e _ y )   { 
 
                 i f   ( s c r o l l _ d i r   = =   " u p " )   { 
 
                         s c r o l l   =   M a t h . f l o o r ( s c r o l l   /   l i n e _ h e i g h t )   *   l i n e _ h e i g h t ; 
 
                 } 
 
                 i f   ( s c r o l l _ d i r   = =   " d o w n " )   { 
 
                         s c r o l l   =   M a t h . c e i l ( s c r o l l   /   l i n e _ h e i g h t )   *   l i n e _ h e i g h t ; 
 
                 } 
 
                 s c r o l l _ c h e c k ( ) ; 
 
         } 
 
 } 
 
 
 
 f u n c t i o n   o n _ m o u s e _ l b t n _ d b l c l k ( x ,   y ) { 
 
         g r o u p   =   i t e m _ n a m e _ a r r a y _ 0 [ i d x ]   & &   i t e m _ n a m e _ a r r a y _ 0 [ i d x ] . s e a r c h ( ' g r o u p ' )   > =   0   ?   t r u e   :   f a l s e ; 
 
               
 
         i f   ( g r o u p ) { 
 
                 g r o u p _ n a m e   =   i t e m _ n a m e _ a r r a y _ 0 [ i d x ] . r e p l a c e ( " g r o u p _ " ,   " " ) ; 
 
                 g r o u p _ c o l l a p s e d   =   w i n d o w . G e t P r o p e r t y ( g r o u p _ n a m e ) ; 
 
                 w i n d o w . S e t P r o p e r t y ( g r o u p _ n a m e ,   ! g r o u p _ c o l l a p s e d ) ; 
 
                 c r e a t e _ a r r a y ( ) ; 
 
                 w i n d o w . R e p a i n t ( ) ; 
 
         } 
 
       
 
         i f   ( ! c o n t r o l _ d o w n ) { 
 
                 i n i _ s e l e c t e d _ i d x ( 0 ) ; 
 
                 c o p y _ t o _ c l i p b o a r d ( ) ; 
 
                 w i n d o w . R e p a i n t ( ) ; 
 
         } 
 
 } 
 
 
 
 f u n c t i o n   o n _ m o u s e _ m o v e ( x ,   y )   { 
 
         i f   ( s h i f t _ d o w n   & &   ! m o v e _ x )   d r a g _ x   =   x   -   t _ x 2 ; 
 
       
 
         i d x   =   M a t h . f l o o r ( ( y   +   M a t h . a b s ( s c r o l l ) )   /   l i n e _ h e i g h t ) ; 
 
 
 
         p o s _ x   =   x ; 
 
         m o u s e _ o n _ p o s ( ) ; 
 
       
 
         i f   ( T o o l t i p   & &   ! s c r o l l _ t i m e r _ o n   & &   ! l b t n _ d o w n   & &   ! s h i f t _ d o w n   & &   ! c o n t r o l _ d o w n   & &   ( o l d _ y   ! =   y   | |   o l d _ x   ! =   x ) ) { 
 
                 i f   ( p _ w s h )   t o o l t i p _ a c t i v a t e _ w s h ( x ,   y ) ; 
 
                 i f   ( p _ j s c r i p t )   t o o l t i p _ a c t i v a t e _ j s c r i p t ( x ,   y ) ; 
 
 
 
                 o l d _ y   =   y ; 
 
                 o l d _ x   =   x ; 
 
         } 
 
 
 
         i f   ( l b t n _ d o w n   & &   m o v e _ y   & &   ! c o n t r o l _ d o w n   & &   ! s h i f t _ d o w n )   { 
 
                 i f   ( t e x t _ h e i g h t   >   p a n e l _ h e i g h t ) { 
 
                         s c r o l l   =   ( y   -   d r a g _ y ) ; 
 
                         s c r o l l _ c h e c k ( ) ; 	 
 
                 } 
 
                 
 
                 i f   ( y   <   o l d _ y ) { 
 
                         s c r o l l _ d i r   =   " u p " ; 
 
                 }   e l s e   { 
 
                         s c r o l l _ d i r   =   " d o w n " ;   
 
                 } 
 
                 o l d _ y   =   y ; 
 
                 
 
                 i f   ( s c r o l l   = =   ( t e x t _ h e i g h t   -   p a n e l _ h e i g h t )   *   - 1   & &   s c r o l l _ d i r   = =   " u p " ) { 
 
                         d r a g _ y   =   ( y   < =   0   ?   0   :   y )   -   s c r o l l ;     
 
                 } 
 
                 i f   ( s c r o l l   = =   0   & &   s c r o l l _ d i r   = =   " d o w n " ) { 
 
                         d r a g _ y   =   ( y   > =   w h   ?   w h   :   y )   -   s c r o l l ;   
 
                 } 
 
         } 
 
   
 
         i f   ( l b t n _ d o w n   & &   m o v e _ x )   { 
 
                 a u t o _ s i z i n g   =   f a l s e ; 
 
                 w i n d o w . S e t P r o p e r t y ( " a u t o   s i z i n g " ,   a u t o _ s i z i n g ) ; 
 
                 t m p _ t _ x 2   =   x   -   d r a g _ x ; 
 
                 t _ x 2   =   t m p _ t _ x 2   < =   t _ x 1   ?   t _ x 1   :   t m p _ t _ x 2   > =   w w   -   s c r o l l b a r _ w   -   t _ x 1   -   5 0   ?   w w   -   s c r o l l b a r _ w   -   t _ x 1   -   5 0   :   t m p _ t _ x 2 ; 
 
                 w i n d o w . R e p a i n t ( ) ; 
 
         } 
 
 
 
         i f   ( c o n t r o l _ d o w n   & &   l b t n _ d o w n   & &   o l d _ i d x   ! =   i d x ) { 
 
                 s e l e c t e d _ i d x [ i d x ]   =   s e l e c t e d _ i d x [ i d x ]   = =   0   ?   1   :   0 ; 
 
                 c o p y _ t o _ c l i p b o a r d ( ) ; 
 
                 o l d _ i d x   =   i d x ; 
 
         } 
 
 } 
 
 
 
 f u n c t i o n   o n _ m o u s e _ w h e e l ( s t e p )   { 
 
         i f   ( m o v e _ y )   { 
 
                 i f   ( t e x t _ h e i g h t   >   p a n e l _ h e i g h t ) { 
 
                         v a r   c o r   =   ( M a t h . a b s ( s c r o l l )   +   p a n e l _ h e i g h t   > =   t e x t _ h e i g h t   ?   ( s c r o l l _   /   l i n e _ h e i g h t )   -   p a r s e I n t ( s c r o l l _   /   l i n e _ h e i g h t )   :   0 )   *   l i n e _ h e i g h t ; 
 
                         s c r o l l   - =   ( s t e p   *   - 1 )   *   l i n e _ h e i g h t   *   ( s c r o l l _ t i m e r _ o n   ?   4   :   2 )   +   c o r ;   / /   *   2 	 	 	 
 
                         s c r o l l _ c h e c k ( ) ; 	 
 
                 } 
 
         } 
 
 } 
 
 
 
 f u n c t i o n   o n _ m o u s e _ l e a v e ( )   { 
 
         w i n d o w . S e t C u r s o r ( I D C _ A R R O W ) ; 
 
         w i n d o w . R e p a i n t ( ) ; 
 
 } 
 
 
 
 f u n c t i o n   m o u s e _ o n _ p o s ( ) { 
 
         i f   ( s h i f t _ d o w n   & &   p o s _ x   > =   t _ x 2 )   { 
 
                 m o v e _ x   =   t r u e ; 
 
                 m o v e _ y   =   f a l s e ; 
 
         }   e l s e   { 
 
                 m o v e _ x   =   f a l s e ; 
 
                 m o v e _ y   =   t r u e ; 
 
         } 
 
         s e t _ c u r s o r ( ) ; 
 
 } 
 
 
 
 f u n c t i o n   o n _ k e y _ d o w n ( v k e y )   { 
 
         d e a c t i v e _ t o o l t i p ( ) ; 
 
         
 
         i f   ( v k e y   = =   V K _ S H I F T ) { 
 
                 s h i f t _ d o w n   =   t r u e ; 
 
                 i f   ( l b t n _ d o w n )   d r a g _ x   =   p o s _ x   -   t _ x 2 ; 
 
         } 
 
         m o u s e _ o n _ p o s ( ) ; 
 
       
 
         i f   ( v k e y   = =   V K _ C O N T R O L ) { 
 
                 c o n t r o l _ d o w n   =   t r u e ; 
 
         } 
 
       
 
         i f   ( v k e y   = =   V K _ E S C A P E ) { 
 
                 i n i _ s e l e c t e d _ i d x ( 0 ) ; 
 
                 c o p y _ t o _ c l i p b o a r d ( ) ; 
 
         } 
 
 } 
 
 
 
 f u n c t i o n   o n _ k e y _ u p ( v k e y )   { 
 
         i f   ( v k e y   = =   V K _ S H I F T ) { 
 
                 s h i f t _ d o w n   =   f a l s e ; 
 
         } 
 
 
 
         m o u s e _ o n _ p o s ( ) ; 
 
         
 
         i f   ( v k e y   = =   V K _ C O N T R O L ) { 
 
                 c o n t r o l _ d o w n   =   f a l s e ; 
 
         } 
 
 } 
 
 
 
 f u n c t i o n   o n _ s i z e ( )   { 
 
         w w   =   w i n d o w . W i d t h ; 
 
         w h   =   w i n d o w . H e i g h t ; 
 
 } 
 
 
 
 f u n c t i o n   c l e a r _ i t e m _ n a m e ( n )   { 
 
         r e t u r n   n . r e p l a c e ( / . * \ ( | l a s t f m _ | r e p l a y g a i n _ | [ ^ a - z 0 - 9 \ s \ _ ] / g ,   " " ) . r e p l a c e ( / _ / g ,   "   " ) ; 
 
 } 
 
 
 
 f u n c t i o n   c l e a r _ g r o u p _ t e x t ( n )   { 
 
         r e t u r n   n . r e p l a c e ( / g r o u p _ / g , " " ) . r e p l a c e ( / ( ? = . ) / g , "   " ) . r e p l a c e ( / ^ \ s / g , " " ) 
 
 } 
 
 
 
 f u n c t i o n   c r e a t e _ a r r a y ( )   { 
 
         t m p _ i t e m _ n a m e _ a r r a y _ 0   =   [ ] ; 
 
         t m p _ i t e m _ n a m e _ a r r a y _ 1   =   [ ] ; 
 
         t m p _ i t e m _ v a l u e _ a r r a y   =   [ ] ; 
 
       
 
         t _ x 2   =   0 ; 
 
         s i m i l a r _ a r t i s t   =   [ ] ; 
 
       
 
         f o r   ( j   =   0 ;   j   <   t f n a m e . l e n g t h ;   j + + )   { 
 
                 g r o u p   =   t f n a m e [ j ] [ 0 ] . s e a r c h ( ' g r o u p ' )   > =   0   ?   t r u e   :   f a l s e ; 
 
 
 
                 v a r   v a l u e   =   " " ; 
 
               
 
                 i f   ( ! g r o u p )   { 
 
                         s w i t c h   ( t f n a m e [ j ] [ 0 ] )   { 
 
                         c a s e   " % l a s t f m _ a l b u m _ l i s t e n e r s % " : 
 
                                 v a l u e   =   E v a l ( t f n a m e [ j ] [ 0 ] )   ?   E v a l ( t f n a m e [ j ] [ 0 ] )   :   a l b u m _ i n f o [ 1 ] ; 
 
                                 b r e a k ; 
 
                         c a s e   " % l a s t f m _ a l b u m _ p l a y c o u n t % " : 
 
                                 v a l u e   =   E v a l ( t f n a m e [ j ] [ 0 ] )   ?   E v a l ( t f n a m e [ j ] [ 0 ] )   :   a l b u m _ i n f o [ 0 ] ; 
 
                                 b r e a k ; 
 
                         c a s e   " % l a s t f m _ a r t i s t _ l i s t e n e r s % " : 
 
                                 v a l u e   =   E v a l ( t f n a m e [ j ] [ 0 ] )   ?   E v a l ( t f n a m e [ j ] [ 0 ] )   :   a r t i s t _ i n f o [ 1 ] ; 
 
                                 b r e a k ; 
 
                         c a s e   " % l a s t f m _ a r t i s t _ p l a y c o u n t % " : 
 
                                 v a l u e   =   E v a l ( t f n a m e [ j ] [ 0 ] )   ?   E v a l ( t f n a m e [ j ] [ 0 ] )   :   a r t i s t _ i n f o [ 0 ] ; 
 
                                 b r e a k ; 
 
                         c a s e   " % l a s t f m _ s i m i l a r _ a r t i s t % " : 
 
                                 v a l u e   =   E v a l ( t f n a m e [ j ] [ 0 ] )   ?   E v a l ( t f n a m e [ j ] [ 0 ] )   :   s i m i l a r ; 
 
                                 s i m i l a r _ a r t i s t   =   v a l u e   ?   v a l u e . s p l i t ( ' ; ' )   :   " "   ; 
 
                                 b r e a k ; 
 
                         d e f a u l t : 
 
                                 v a l u e   =   t f n a m e [ j ] [ 0 ] . s e a r c h ( / _ m o d i f i e d | _ p l a y e d | _ p l a y e d | a d d e d / g )   >   0   ?   d a t a _ f o r m a t ( E v a l ( t f n a m e [ j ] [ 0 ] ) )   :   E v a l ( t f n a m e [ j ] [ 0 ] ) ; 
 
                         } 
 
                 } 
 
 
 
                 i f   ( v a l u e   & &   v a l u e   ! =   0   | |   g r o u p )   { 
 
                         t m p _ i t e m _ n a m e _ a r r a y _ 0 . p u s h ( t f n a m e [ j ] [ 0 ] ) ; 
 
                         t m p _ i t e m _ n a m e _ a r r a y _ 1 . p u s h ( t f n a m e [ j ] [ 1 ] ) ; 
 
                         
 
                         m _ t e x t   =   g e t _ m e a s u r e ( t f n a m e [ j ] [ 0 ] ) ; 
 
                         v a l u e   =   v a l u e   +   ( m _ t e x t   ?   "   "   +   m _ t e x t   :   " " ) ; 
 
                         
 
                         i f   ( t f n a m e [ j ] [ 0 ]   ! =   " % l a s t f m _ s i m i l a r _ a r t i s t % " ) { 
 
                                 t m p _ i t e m _ v a l u e _ a r r a y . p u s h ( v a l u e ) ; 
 
                         } 
 
                 } 
 
               
 
                 i f   ( v a l u e   & &   v a l u e   ! =   0   & &   ! g r o u p ) { 
 
                         t m p   =   l a n g   = =   0   ?   c l e a r _ i t e m _ n a m e ( t f n a m e [ j ] [ 0 ] )   :   t f n a m e [ j ] [ 1 ] ; 
 
                         t m p _ t _ x 2   =   c a l c _ t e x t _ d a t a ( " w " ,   t m p ,   f o n t _ i t e m _ n a m e ) ; 
 
                         t _ x 2   =   t m p _ t _ x 2   >   t _ x 2   ?   t m p _ t _ x 2   :   t _ x 2 ; 
 
                 } 
 
         } 
 
       
 
         t _ x 2   =   a u t o _ s i z i n g   ?   t _ x 2   +   t _ x 1   +   1 0   :   w i n d o w . G e t P r o p e r t y ( " t e x t :   x 2   c u s t o m " ) ; 
 
 
 
         f o r   ( v a r   i   =   0 ;   i   <   s i m i l a r _ a r t i s t . l e n g t h ;   i + + )   { 
 
                 i f   ( i   > =   1 )   { 
 
                         t m p _ i t e m _ n a m e _ a r r a y _ 0 . p u s h ( " " ) ; 
 
                         t m p _ i t e m _ n a m e _ a r r a y _ 1 . p u s h ( " " ) ; 
 
                 } 
 
                 v a l u e   =   s i m i l a r _ a r t i s t [ i ] . r e p l a c e ( / ^ \ s + | \ s + $ / g ,   " " ) ; 
 
                 t m p _ i t e m _ v a l u e _ a r r a y . p u s h ( v a l u e ) ; 
 
         } 
 
 
 
         c l e a r _ c o l l a p s e _ e x p a n d _ g r o u p s ( ) ; 
 
       
 
         i n i _ s e l e c t e d _ i d x ( 0 ) ; 
 
 } 
 
 
 
 f u n c t i o n   c l e a r _ c o l l a p s e _ e x p a n d _ g r o u p s ( )   { 
 
         i t e m _ n a m e _ a r r a y _ 0   =   [ ] ; 
 
         i t e m _ n a m e _ a r r a y _ 1   =   [ ] ; 
 
         i t e m _ v a l u e _ a r r a y   =   [ ] ; 
 
       
 
         g r o u p _ n a m e   =   g r o u p s [ 0 ] ; 
 
       
 
         f o r   ( j   =   0 ;   j   <   t m p _ i t e m _ n a m e _ a r r a y _ 0 . l e n g t h ;   j + + )   { 
 
                 g r o u p   =   t m p _ i t e m _ n a m e _ a r r a y _ 0 [ j ] . s e a r c h ( ' g r o u p ' )   > =   0   ?   t r u e   :   f a l s e ; 
 
               
 
                 i f   ( g r o u p ) { 
 
                         g r o u p _ n a m e   =   t m p _ i t e m _ n a m e _ a r r a y _ 0 [ j ] . r e p l a c e ( " g r o u p _ " ,   " " ) ; 
 
                 } 
 
 
 
                 s e l e c t e d _ i t e m s   =   w i n d o w . G e t P r o p e r t y ( g r o u p _ n a m e ) ; 
 
 
 
                 i t e m _ n a m e _ 0   =   t m p _ i t e m _ n a m e _ a r r a y _ 0 [ j ] ; 
 
                 i t e m _ n a m e _ 1   =   t m p _ i t e m _ n a m e _ a r r a y _ 1 [ j ] ; 
 
                 i t e m _ v a l u e   =   t m p _ i t e m _ v a l u e _ a r r a y [ j ] ; 
 
               
 
                 i f   ( ! g r o u p ) { 
 
                         i f   ( s e l e c t e d _ i t e m s ) { 
 
                                 i t e m _ n a m e _ a r r a y _ 0 . p u s h ( i t e m _ n a m e _ 0 ) ; 
 
                                 i t e m _ n a m e _ a r r a y _ 1 . p u s h ( i t e m _ n a m e _ 1 ) ; 
 
                                 i t e m _ v a l u e _ a r r a y . p u s h ( i t e m _ v a l u e ) ;   
 
                         }                       
 
                 } 
 
               
 
                 i f   ( g r o u p ) { 
 
                         i f   ( t m p _ i t e m _ v a l u e _ a r r a y [ j   +   1 ] ) { 
 
                                 i t e m _ n a m e _ a r r a y _ 0 . p u s h ( i t e m _ n a m e _ 0 ) ; 
 
                                 i t e m _ n a m e _ a r r a y _ 1 . p u s h ( i t e m _ n a m e _ 1 ) ; 
 
                                 i t e m _ v a l u e _ a r r a y . p u s h ( i t e m _ v a l u e ) ;   
 
                         } 
 
                 } 
 
         } 
 
         w i n d o w . R e p a i n t ( ) ; 
 
 } 
 
 
 
 f u n c t i o n   d r a w _ a r r a y ( g r )   { 
 
         l i n e _ h e i g h t _ n a m e   =   g r . C a l c T e x t H e i g h t ( " T e x t " ,   f o n t _ i t e m _ n a m e ) ; 
 
         l i n e _ h e i g h t _ v a l u e   =   g r . C a l c T e x t H e i g h t ( " T e x t " ,   f o n t _ i t e m _ v a l u e ) ; 
 
         l i n e _ h e i g h t   =   M a t h . m a x ( l i n e _ h e i g h t _ n a m e ,   l i n e _ h e i g h t _ v a l u e )   +   w i n d o w . G e t P r o p e r t y ( "   v e r t i c a l   i t e m   p a d d i n g " ) ; 
 
       
 
         t e x t _ h e i g h t   =   i t e m _ n a m e _ a r r a y _ 0 . l e n g t h   *   l i n e _ h e i g h t ; 
 
         p a n e l _ h e i g h t   =   w i n d o w . H e i g h t ; 
 
         
 
         i f   ( t e x t _ h e i g h t   < =   p a n e l _ h e i g h t   & &   s c r o l l   <   0 )   { 
 
                 s c r o l l   =   0 ; 
 
                 s c r o l l _ c h e c k ( ) ; 	 
 
         } 
 
 
 
         s t a r _ s i z e   =   l i n e _ h e i g h t _ v a l u e   -   3 ; 
 
         s t a r _ o f f s e t   =   s t a r _ s i z e   +   2 ; 
 
       
 
         f o r   ( v a r   i   =   0 ;   i   <   i t e m _ n a m e _ a r r a y _ 0 . l e n g t h ;   i + + )   { 
 
                 g r o u p   =   i t e m _ n a m e _ a r r a y _ 0 [ i ] . s e a r c h ( ' g r o u p ' )   > =   0   ?   t r u e   :   f a l s e ; 
 
               
 
                 t _ y   =   i   *   l i n e _ h e i g h t   +   s c r o l l _ ; 
 
 
 
                 i f   ( g r o u p ) { 
 
                         n a m e   =   l a n g   = =   0   ?   c l e a r _ g r o u p _ t e x t ( i t e m _ n a m e _ a r r a y _ 0 [ i ] )   :   i t e m _ n a m e _ a r r a y _ 1 [ i ] ; 
 
 
 
                         t _ w   =   w w   -   s c r o l l b a r _ w   -   t _ x 1   *   2 ; 
 
                       
 
                         g r o u p _ t e x t   & &   g r . G d i D r a w T e x t (   n a m e ,   f o n t _ g r o u p ,   c o l o r _ g r o u p _ t e x t ,   t _ x 1 ,   t _ y ,   t _ w ,   l i n e _ h e i g h t ,   D T _ L E F T   |   D T _ S I N G L E L I N E   |   D T _ V C E N T E R   |   D T _ W O R D _ E L L I P S I S   |   D T _ N O P R E F I X ) ;                   
 
 
 
                         l _ x   =   g r o u p _ t e x t   & &   n a m e   ?   M a t h . m i n ( g r . C a l c T e x t W i d t h ( n a m e ,   f o n t _ g r o u p )   +   5 ,   w w   -   s c r o l l b a r _ w   -   t _ x 1   *   2 )   :   0 ; 
 
                         l _ y   =   t _ y   +   l i n e _ h e i g h t   /   2 ; 
 
                         g r . D r a w L i n e ( t _ x 1   +   l _ x ,   l _ y ,   w w   -   s c r o l l b a r _ w   -   t _ x 1 ,   l _ y ,   1 ,   c o l o r _ g r o u p _ t e x t ) ; 
 
                 } 
 
 
 
                 i f   ( ! g r o u p ) { 
 
                         t _ w   =   M a t h . m i n ( w w   -   s c r o l l b a r _ w   -   ( w w   -   s c r o l l b a r _ w   -   t _ x 2 ) -   t _ x 1 ,   w w   -   s c r o l l b a r _ w   -   t _ x 1   *   2 )   -   1 0 ; 
 
                         t _ w 2   =   w w   -   s c r o l l b a r _ w   -   t _ x 2   -   t _ x 1 ; 
 
 
 
                         c o l o r _ n a m e   =   c o l o r _ i t e m _ n a m e ; 
 
                         c o l o r _ v a l u e   =   c o l o r _ i t e m _ v a l u e ; 
 
 
 
                         i f   ( s e l e c t e d _ i d x [ i ]   ! =   0 ) { 
 
                                 i f   ( c l i p b o a r d _ i t e m _ n a m e ) { 
 
                                         g r . F i l l S o l i d R e c t ( t _ x 1   -   5 ,   t _ y ,   w w   -   s c r o l l b a r _ w   -   t _ x 1   *   2   +   1 0 ,   l i n e _ h e i g h t   -   1 ,   b g c o l o r _ i n v ) ; 
 
                                         c o l o r _ n a m e   =   b g c o l o r ; 
 
                                         c o l o r _ v a l u e   =   b g c o l o r ; 
 
                                 }   e l s e   { 
 
                                         g r . F i l l S o l i d R e c t ( t _ x 2   -   5 ,   t _ y ,   t _ w 2   +   1 0 ,   l i n e _ h e i g h t   -   1 ,   b g c o l o r _ i n v ) ; 
 
                                         c o l o r _ v a l u e   =   b g c o l o r ; 
 
                                 } 
 
                         }   
 
 
 
                         r a t i n g _ t e x t   =   i t e m _ n a m e _ a r r a y _ 0 [ i ]   = =   " $ m e t a ( r a t i n g ) "   ?   "   "   +   t a g _ t e x t _ a r r [ l a n g ]   :   " " ; 
 
                       
 
                         n a m e   =   ( l a n g   = =   0   ?   c l e a r _ i t e m _ n a m e ( i t e m _ n a m e _ a r r a y _ 0 [ i ] )   :   i t e m _ n a m e _ a r r a y _ 1 [ i ] )   +   r a t i n g _ t e x t ; 
 
                         g r . G d i D r a w T e x t (   n a m e ,   f o n t _ i t e m _ n a m e ,   c o l o r _ n a m e ,   t _ x 1 ,   t _ y ,   t _ w ,   l i n e _ h e i g h t ,   D T _ L E F T   |   D T _ S I N G L E L I N E   |   D T _ V C E N T E R   |   D T _ W O R D _ E L L I P S I S   |   D T _ N O P R E F I X ) ;                   
 
 
 
                         i f   ( i t e m _ n a m e _ a r r a y _ 0 [ i ] . s e a r c h ( / r a t i n g / g )   >   0 ) {           
 
                                 f o r   ( v a r   r   =   0 ;   r   <   M a t h . m i n ( i t e m _ v a l u e _ a r r a y [ i ]   *   s t a r _ o f f s e t ,   w w   -   s c r o l l b a r _ w   -   t _ x 2   -   t _ x 1   -   s t a r _ s i z e   /   2 ) ;   r   =   r   +   s t a r _ o f f s e t )   { 
 
                                         d r a w _ s t a r ( g r ,   t _ x 2   +   s t a r _ s i z e   /   3   +   r ,   t _ y   +   l i n e _ h e i g h t   /   2   -   1 ,   s t a r _ s i z e ,   t r u e ,   0 ,   c o l o r _ v a l u e ,   f a l s e ,   b g c o l o r ,   2 5 5 ) ; 
 
                                 } 
 
                         }   e l s e   { 
 
                                 v a l u e   =   i t e m _ v a l u e _ a r r a y [ i ] ; 
 
                                 g r . G d i D r a w T e x t (   v a l u e ,   f o n t _ i t e m _ v a l u e ,   c o l o r _ v a l u e ,   t _ x 2 ,   t _ y ,   t _ w 2 ,   l i n e _ h e i g h t ,   D T _ L E F T   |   D T _ S I N G L E L I N E   |   D T _ V C E N T E R   |   D T _ W O R D _ E L L I P S I S   |   D T _ N O P R E F I X ) ;   
 
                         } 
 
                 } 
 
         } 
 
 } 
 
 
 
 f u n c t i o n   d r a w _ s c r o l l b a r ( g r ) { 
 
         t e x t _ v i s a b l e _ r o w s   =   M a t h . f l o o r ( p a n e l _ h e i g h t   /   l i n e _ h e i g h t ) ; 
 
         t e x t _ r o w s   =   i t e m _ n a m e _ a r r a y _ 0 . l e n g t h ; 
 
         s c r o l l b a r _ k   =   p a n e l _ h e i g h t   /   t e x t _ r o w s ; 
 
         
 
         s c r o l l b a r _ x   =   w w   -   s c r o l l b a r _ w   -   1 ; 
 
         s c r o l l b a r _ y   =   s c r o l l _   <   0   ?   ( s c r o l l _   *   - 1 )   /   l i n e _ h e i g h t   *   s c r o l l b a r _ k   :   0 ; 
 
         s c r o l l b a r _ h   =   t e x t _ r o w s   >   t e x t _ v i s a b l e _ r o w s   ?   p a n e l _ h e i g h t   *   ( t e x t _ v i s a b l e _ r o w s   /   t e x t _ r o w s )   :   0 ; 
 
 
 
         g r . S e t S m o o t h i n g M o d e ( 2 ) ; 
 
         g r . F i l l S o l i d R e c t ( s c r o l l b a r _ x ,   s c r o l l b a r _ y ,   s c r o l l b a r _ w ,   s c r o l l b a r _ h ,   c o l o r _ s c r o l l b a r ) ; 
 
 }     
 
               
 
 v a r   m e t a d b ; 
 
 o n _ i t e m _ f o c u s _ c h a n g e ( ) ; 
 
 
 
 f u n c t i o n   o n _ p l a y l i s t _ s w i t c h ( )   { 
 
         o n _ i t e m _ f o c u s _ c h a n g e ( ) ; 
 
 } 
 
 
 
 f u n c t i o n   o n _ p l a y b a c k _ n e w _ t r a c k ( )   { 
 
         o n _ i t e m _ f o c u s _ c h a n g e ( ) ; 
 
 } 
 
 
 
 f u n c t i o n   o n _ p l a y b a c k _ d y n a m i c _ i n f o _ t r a c k ( )   { 
 
         o n _ i t e m _ f o c u s _ c h a n g e ( ) ; 
 
 } 
 
 
 
 f u n c t i o n   o n _ p l a y b a c k _ s t o p ( )   { 
 
         o n _ i t e m _ f o c u s _ c h a n g e ( ) ; 
 
 } 
 
 
 
 f u n c t i o n   o n _ s e l e c t i o n _ c h a n g e d ( m e t a d b )   { 
 
       o n _ i t e m _ f o c u s _ c h a n g e ( ) ; 
 
 } 
 
 
 
 f u n c t i o n   o n _ i t e m _ f o c u s _ c h a n g e ( )   { 
 
         s w i t c h   ( s e l e c t i o n _ m o d e )   {       
 
         c a s e   0 :       
 
                 m e t a d b   =   f b . I s P l a y i n g   ?   f b . G e t N o w P l a y i n g ( )   :   f b . G e t F o c u s I t e m ( ) ; 
 
                 b r e a k ; 
 
         c a s e   1 : 
 
               m e t a d b   =   f b . G e t F o c u s I t e m ( ) ; 
 
                 b r e a k ; 
 
         } 
 
         i f   ( m e t a d b )   o n _ m e t a d b _ c h a n g e d ( ) ; 
 
 } 
 
 
 
 f u n c t i o n   o n _ m e t a d b _ c h a n g e d ( )   { 
 
         / / i f   ( ! p a n e l _ o n )   r e t u r n ; 
 
         a r t i s t   =   E v a l ( " % a r t i s t % " ) ; 
 
         a l b u m   =   E v a l ( " % a l b u m % " ) ; 
 
 
 
         i f   ( a l b u m   ! =   o l d _ a l b u m )   { 
 
                 a l b u m _ i n f o   =   [ ] ; 
 
                 g e t _ l a s t F M _ a l b u m _ i n f o ( a r t i s t ,   a l b u m ) 
 
                 o l d _ a l b u m   =   a l b u m ; 
 
         } 
 
 
 
         i f   ( a r t i s t   ! =   o l d _ a r t i s t )   { 
 
                 s i m i l a r   =   " " ; 
 
                 g e t _ l a s t F M _ s i m i l a r ( a r t i s t ) ; 
 
                 a r t i s t _ i n f o   =   [ ] ; 
 
                 g e t _ l a s t F M _ a r t i s t _ i n f o ( a r t i s t ) ; 
 
                 o l d _ a r t i s t   =   a r t i s t ; 
 
         } 
 
 
 
         c r e a t e _ a r r a y ( ) ; 
 
 } 
 
 
 
 f u n c t i o n   E v a l ( f i e l d )   { 
 
         i f   ( m e t a d b )   { 
 
                 t y p e   =   m e t a d b . R a w P a t h ; 
 
 
 
                 i f   ( t y p e . i n d e x O f ( " f i l e " )   > =   0 ) { 
 
                         r e t u r n   f b . T i t l e F o r m a t ( " [ "   +   f i e l d   +   " ] " ) . E v a l W i t h M e t a d b ( m e t a d b ) ; 
 
                 }   e l s e { 
 
                         i f   ( s e l e c t i o n _ m o d e   = =   0 ) { 
 
                                 i f   ( f i e l d   = =   " $ m e t a ( a r t i s t ) "   | |   f i e l d   = =   " % t i t l e % "   | |   f i e l d   = =   " % a r t i s t % " ) { 
 
                                         r e t u r n   f b . T i t l e F o r m a t ( " [ "   +   f i e l d   +   " ] " ) . E v a l ( t r u e ) ; 
 
                                 } 
 
                                 i f   ( f i e l d   = =   " % g e n r e % " ) { 
 
                                         r e t u r n   f b . T i t l e F o r m a t ( " [ "   +   f i e l d   +   " ] " ) . E v a l W i t h M e t a d b ( m e t a d b ) ; 
 
                                 } 
 
                         } 
 
                         r e t u r n   f b . T i t l e F o r m a t ( " [ "   +   f i e l d   +   " ] " ) . E v a l W i t h M e t a d b ( m e t a d b ) ; 
 
                 } 
 
         } 
 
 } 
 
 
 
 f u n c t i o n   o n _ m o u s e _ r b t n _ u p   ( x ,   y ) {       
 
         t o o l t i p _ s t a t e   & &   t o o l t i p . D e a c t i v a t e ( ) ; 
 
 
 
         v a r   _ m e n u   =   w i n d o w . C r e a t e P o p u p M e n u ( ) ; 
 
       
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ E N A B L E D ,   1 0 ,   " P r e f e r   n o w   p l a y i n g " ) ; 
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ E N A B L E D ,   1 1 ,   " F o l l o w   s e l e c t e d   t r a c k " ) ; 
 
         _ m e n u . C h e c k M e n u R a d i o I t e m ( 1 0 ,   1 1 ,   s e l e c t i o n _ m o d e   +   1 0 ) ; 
 
         t r y   { 
 
                 _ m e n u . E n a b l e M e n u I t e m ( s e l e c t i o n _ m o d e   +   1 0 ,   1 ) ;     
 
         }   c a t c h ( e )   { } 
 
 
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ S E P A R A T O R ,   0 ,   0 ) ; 
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ E N A B L E D ,   2 0 ,   " G r o u p   t e x t " ) ; 
 
         _ m e n u . C h e c k M e n u I t e m ( 2 0 ,   g r o u p _ t e x t ) ; 
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ E N A B L E D ,   3 0 ,   " T o o l t i p " ) ; 
 
         _ m e n u . C h e c k M e n u I t e m ( 3 0 ,   T o o l t i p ) ; 
 
       
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ S E P A R A T O R ,   0 ,   0 ) ; 
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ E N A B L E D ,   5 0 ,   " C r e a t e   t x t / x l s   f i l e " ) ; 
 
       
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ S E P A R A T O R ,   0 ,   0 ) ; 
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ E N A B L E D ,   6 0 ,   " A u t o - s i z i n g   c o l u m n s " ) ; 
 
         _ m e n u . C h e c k M e n u I t e m ( 6 0 ,   a u t o _ s i z i n g ) ; 
 
       
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ S E P A R A T O R ,   0 ,   0 ) ; 
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ E N A B L E D ,   7 0 ,   " I t e m   t e x t :   "   +   l a n g _ t e x t [ 0 ] ) ; 
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ E N A B L E D ,   7 1 ,   " I t e m   t e x t :   "   +   l a n g _ t e x t [ 1 ] ) ; 
 
         _ m e n u . C h e c k M e n u R a d i o I t e m ( 7 0 ,   7 1 ,   l a n g   +   7 0 ) ; 
 
         t r y   { 
 
                 _ m e n u . E n a b l e M e n u I t e m ( l a n g   +   7 0 ,   1 ) ;     
 
         }   c a t c h ( e )   { } 
 
 
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ S E P A R A T O R ,   0 ,   0 ) ; 
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ E N A B L E D ,   8 0 ,   " C o p y   t o   c l i p b o a r d   ( a l l ) " ) ; 
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ E N A B L E D ,   8 1 ,   " C o p y   i t e m   n a m e " ) ; 
 
         _ m e n u . C h e c k M e n u I t e m ( 8 1 ,   c l i p b o a r d _ i t e m _ n a m e ) ; 
 
 
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ S E P A R A T O R ,   0 ,   0 ) ; 
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ E N A B L E D ,   2 0 0 ,   " P r o p e r t i e s " ) ; 
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ E N A B L E D ,   3 0 0 ,   " C o n f i g u r e   . . . " ) ; 
 
 
 
         r e t   =   _ m e n u . T r a c k P o p u p M e n u ( x   +   2 0 ,   y   -   2 0 ) ; 
 
 
 
         s w i t c h   ( r e t )   { 
 
         c a s e   1 0 :       
 
         c a s e   1 1 :   
 
                 s e l e c t i o n _ m o d e   =   r e t   -   1 0 ; 
 
                 w i n d o w . S e t P r o p e r t y ( " s e l e c t i o n _ m o d e " ,   s e l e c t i o n _ m o d e ) ; 
 
                 o n _ i t e m _ f o c u s _ c h a n g e ( ) ; 
 
                 b r e a k ; 
 
         c a s e   2 0 : 
 
                 w i n d o w . S e t P r o p e r t y ( " g r o u p   t e x t " ,   ! g r o u p _ t e x t ) ; 
 
                 g r o u p _ t e x t   =   w i n d o w . G e t P r o p e r t y ( " g r o u p   t e x t " ) ; 
 
                 b r e a k ; 
 
         c a s e   3 0 :   
 
                 w i n d o w . S e t P r o p e r t y ( " t o o l t i p " ,   ! T o o l t i p ) ; 
 
                 T o o l t i p   =   w i n d o w . G e t P r o p e r t y ( " t o o l t i p " ) ; 
 
                 d e a c t i v e _ t o o l t i p ( ) ;       
 
                 b r e a k ; 
 
         c a s e   5 0 : 
 
                 m e n u _ c r e a t e _ f i l e ( x , y ) ; 
 
                 b r e a k ; 
 
         c a s e   6 0 : 
 
                 i f   ( ! a u t o _ s i z i n g ) { 
 
                         a u t o _ s i z i n g   =   t r u e ; 
 
                         w i n d o w . S e t P r o p e r t y ( " a u t o   s i z i n g " ,   a u t o _ s i z i n g ) ; 
 
                         c r e a t e _ a r r a y ( ) ; 
 
                 } 
 
                 b r e a k ; 
 
         c a s e   7 0 : 
 
         c a s e   7 1 : 
 
                 l a n g   =   r e t   -   7 0 ; 
 
                 w i n d o w . S e t P r o p e r t y ( " l a n g " ,   l a n g ) ; 
 
                 c r e a t e _ a r r a y ( ) ; 
 
                 b r e a k ; 
 
         c a s e   8 0 : 
 
                 i n i _ s e l e c t e d _ i d x ( 1 ) ; 
 
                 c o p y _ t o _ c l i p b o a r d ( ) ; 
 
                 b r e a k ; 
 
         c a s e   8 1 : 
 
                 w i n d o w . S e t P r o p e r t y ( " c l i p b o a r d   i t e m   n a m e " ,   ! c l i p b o a r d _ i t e m _ n a m e ) ; 
 
                 c l i p b o a r d _ i t e m _ n a m e   =   w i n d o w . G e t P r o p e r t y ( " c l i p b o a r d   i t e m   n a m e " ) ; 
 
                 i n i _ s e l e c t e d _ i d x ( 0 ) ; 
 
                 c o p y _ t o _ c l i p b o a r d ( ) ; 
 
                 b r e a k ; 
 
         c a s e   1 0 0 : 
 
                 t r y   { 
 
                         w i n d o w . R e l o a d ( ) ;       
 
                 }   c a t c h ( e )   { } ; 
 
                 b r e a k ; 
 
         c a s e   2 0 0 : 
 
                 w i n d o w . S h o w P r o p e r t i e s ( ) ; 
 
                 b r e a k ;       
 
         c a s e   3 0 0 : 
 
                 w i n d o w . S h o w C o n f i g u r e ( ) ;           
 
                 b r e a k ; 
 
       } 
 
         _ m e n u . D i s p o s e ( ) ; 
 
         r e t u r n   t r u e ; 
 
 } 
 
 
 
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / /     C r e a t e   f i l e 
 
 
 
 v a r   f s o   =   n e w   A c t i v e X O b j e c t ( " S c r i p t i n g . F i l e S y s t e m O b j e c t " ) ; 
 
 v a r   o u t p u t _ p a t h   =   f b . F o o b a r P a t h   +   " \ \ t m p _ P r o p e r t i e s \ \ " ; 
 
 
 
 f u n c t i o n   c h e c k _ f o l d e r ( n )   { 
 
         i f   ( ! n )   r e t u r n ; 
 
         t r y   { 
 
                 i f ( ! f s o . F o l d e r E x i s t s ( n ) )   { f s o . C r e a t e F o l d e r ( n ) } ; 
 
         }   c a t c h ( e )   { } 
 
 } 
 
 
 
 w i n d o w . G e t P r o p e r t y ( " e x t " ,   1 ) ; 
 
 v a r   s e p a r a t o r   =   A r r a y ( "   ;   " , " \ t " ) ;   
 
 v a r   t m p _ o u t p u t _ i t e m _ n a m e _ a r r a y   =   [ ] ; 
 
 v a r   o u t p u t _ a r r a y   =   [ ] ; 
 
 v a r   p l l i s t _ n a m e ; 
 
 v a r   s e l e c t e d ; 
 
 v a r   s h i f t   =   0 ; 
 
 
 
 c r e a t e _ t m p _ o u t p u t _ i t e m _ n a m e _ a r r a y ( ) ; 
 
 
 
 f u n c t i o n     c r e a t e _ t m p _ o u t p u t _ i t e m _ n a m e _ a r r a y ( )   { 
 
         t m p _ o u t p u t _ i t e m _ n a m e _ a r r a y   =   [ ] ; 
 
         f o r   ( v a r   j   =   0 ;   j   <   t f n a m e . l e n g t h ;   j + + )   {       
 
                 i f   ( t f n a m e [ j ] [ 0 ] . s e a r c h ( / g r o u p | l a s t f m / g )   <   0 ) { 
 
                         t m p _ o u t p u t _ i t e m _ n a m e _ a r r a y . p u s h ( t f n a m e [ j ] [ 0 ] ) ; 
 
                 } 
 
         } 
 
 } 
 
 
 
 f o r   ( v a r   j   =   0 ;   j   <   t m p _ o u t p u t _ i t e m _ n a m e _ a r r a y . l e n g t h ;   j + + )   {       
 
         w i n d o w . G e t P r o p e r t y ( j   +   1 ,   f a l s e ) ; 
 
 } 
 
 
 
 f u n c t i o n     c r e a t e _ o u t p u t _ a r r a y ( )   { 
 
         o u t p u t _ a r r a y   =   [ ] ; 
 
         f o r   ( v a r   j   =   0 ;   j   <   t m p _ o u t p u t _ i t e m _ n a m e _ a r r a y . l e n g t h ;   j + + )   {       
 
                 s e l e c t e d   =   w i n d o w . G e t P r o p e r t y ( j   +   1 ) ; 
 
                 i f   (   s e l e c t e d   )   { o u t p u t _ a r r a y . p u s h ( t m p _ o u t p u t _ i t e m _ n a m e _ a r r a y [ j ] ) } ; 
 
         } 
 
         c r e a t e T e x t F i l e ( ) ; 
 
 } 
 
 
 
 f u n c t i o n   c r e a t e T e x t F i l e ( ) { 
 
         c o u n t   =   p l m a n . G e t P l a y l i s t S e l e c t e d I t e m s ( p l m a n . A c t i v e P l a y l i s t ) . C o u n t ; 
 
         i f   ( c o u n t   = =   0   | |   o u t p u t _ a r r a y . l e n g t h   = =   0 )   r e t u r n ; 
 
         
 
         c h e c k _ f o l d e r ( o u t p u t _ p a t h ) ; 
 
 
 
         i f   ( w i n d o w . G e t P r o p e r t y ( " e x t " )   = =   0 )   { 
 
                 o u t p u t _ f i l e   =   o u t p u t _ p a t h   +   " p l i s t   "   +   p l l i s t _ n a m e   +   " . t x t " ; 
 
         }   e l s e   { 
 
                 o u t p u t _ f i l e   =   o u t p u t _ p a t h   +   " p l i s t   "   +   p l l i s t _ n a m e   +   " . x l s " ;   
 
         } 
 
       
 
         t r y   {   f i l e   =   f s o . C r e a t e T e x t F i l e (   o u t p u t _ f i l e   ) 
 
         }   c a t c h ( e )   {   r e t u r n   } ; 
 
       
 
         v a r   t e x t _ i t e m _ n a m e   =   [ ] ; 
 
         v a r   s t r i n g _ i t e m _ n a m e   =   " " ; 
 
       
 
         f o r   ( v a r   j   =   0 ;   j   <   o u t p u t _ a r r a y . l e n g t h ;   j + + )   { 
 
                 t e x t _ i t e m _ n a m e . p u s h ( o u t p u t _ a r r a y [ j ] ) ;               
 
         } 
 
       
 
         s t r i n g _ i t e m _ n a m e   =   t e x t _ i t e m _ n a m e . j o i n ( s e p a r a t o r [ w i n d o w . G e t P r o p e r t y ( " e x t " ) ] ) ; 
 
         f i l e . W r i t e L i n e ( s t r i n g _ i t e m _ n a m e ) ; 
 
         f i l e . W r i t e L i n e ( " " ) ; 
 
 
 
         f o r   ( v a r   i   =   0 ;   i   <   c o u n t ;   i + + )   { 
 
                 i t e m   =   p l m a n . G e t P l a y l i s t S e l e c t e d I t e m s ( p l m a n . A c t i v e P l a y l i s t ) . I t e m ( i ) ; 
 
               
 
                 v a r   t e x t _ i t e m _ v a l u e   =   [ ] ; 
 
                 v a r   s t r i n g _ i t e m _ v a l u e   =   " " ; 
 
               
 
                 f o r   ( v a r   j   =   0 ;   j   <   o u t p u t _ a r r a y . l e n g t h ;   j + + )   {       
 
                         v a l u e   =   f b . T i t l e F o r m a t ( " [ "   +   o u t p u t _ a r r a y [ j ]   +   " ] " ) . E v a l W i t h M e t a d b ( i t e m ) ; 
 
                               
 
                         t e x t   =   g e t _ m e a s u r e ( o u t p u t _ a r r a y [ j ] ) ; 
 
                         t e x t   =   v a l u e   & &   t e x t   ?     "     "   +   t e x t   :   " " ; 
 
                       
 
                         t e x t _ i t e m _ v a l u e . p u s h ( v a l u e   +   t e x t ) ; 
 
                       
 
                         s t r i n g _ i t e m _ v a l u e   =   t e x t _ i t e m _ v a l u e . j o i n ( s e p a r a t o r [ w i n d o w . G e t P r o p e r t y ( " e x t " ) ] ) ; 
 
                 } 
 
               
 
                 t r y   {   f i l e . W r i t e L i n e ( s t r i n g _ i t e m _ v a l u e ) ; 
 
                 }   c a t c h ( e )   { } ;   
 
         } 
 
         f i l e . C l o s e ( ) ; 
 
 } 
 
 
 
 f u n c t i o n   m e n u _ c r e a t e _ f i l e ( x ,   y ) { 
 
         v a r   _ m e n u   =   w i n d o w . C r e a t e P o p u p M e n u ( ) ; 
 
         v a r   i   =   1 ; 
 
   
 
         c o u n t   =   p l m a n . G e t P l a y l i s t S e l e c t e d I t e m s ( p l m a n . A c t i v e P l a y l i s t ) . C o u n t ; 
 
         M F _ S T R I N G   =   c o u n t   = =   0   ?   M F _ G R A Y E D   :   M F _ E N A B L E D ; 
 
       
 
         p l l i s t _ n a m e   =   p l m a n . G e t P l a y l i s t N a m e ( p l m a n . A c t i v e P l a y l i s t ) ; 
 
         p l l i s t _ n a m e   =   c o u n t   = =   0   ?   " * "   :   p l l i s t _ n a m e . r e p l a c e ( / [ \ / \ : \ * \ ? \ " \ < \ > \ | ] / g , ' ' ) ; 
 
       
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ S T R I N G ,   i + + ,   " C r e a t e     "   +   p l l i s t _ n a m e   +   ( w i n d o w . G e t P r o p e r t y ( " e x t " )   = =   0   ?   " . t x t "   :   " . x l s " ) ) ; 
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ S E P A R A T O R ,   0 ,   0 ) ; 
 
       
 
         v a r   l i n e s   =   2 0 ;       
 
         b l   =   t m p _ o u t p u t _ i t e m _ n a m e _ a r r a y . l e n g t h   >   l i n e s   ?   l i n e s   +   s h i f t   :   t m p _ o u t p u t _ i t e m _ n a m e _ a r r a y . l e n g t h ; 
 
 
 
         f o r   ( v a r   j   =   s h i f t ;   j   <   b l ;   j + + )   { 
 
                 m e n u I t e m   =   c l e a r _ i t e m _ n a m e ( t m p _ o u t p u t _ i t e m _ n a m e _ a r r a y [ j ] ) ; 
 
                 _ m e n u . A p p e n d M e n u I t e m ( M F _ E N A B L E D ,   i + + ,   m e n u I t e m ) ;       
 
                 _ m e n u . C h e c k M e n u I t e m ( i   -   1 ,   w i n d o w . G e t P r o p e r t y ( i   -   2   +   s h i f t ) ) ; 
 
         } 
 
       
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ S E P A R A T O R ,   0 ,   0 ) ; 
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ E N A B L E D ,   1 0 0 ,   " t x t " ) ; 
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ E N A B L E D ,   1 0 1 ,   " x l s " ) ; 
 
         _ m e n u . C h e c k M e n u R a d i o I t e m ( 1 0 0 ,   1 0 1 ,   1 0 0   +   w i n d o w . G e t P r o p e r t y ( " e x t " ) ) ;   
 
         t r y   { 
 
                 _ m e n u . E n a b l e M e n u I t e m ( 1 0 0   +   w i n d o w . G e t P r o p e r t y ( " e x t " ) ,   1 ) ; 
 
         }   c a t c h ( e )   { } 
 
       
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ S E P A R A T O R ,   0 ,   0 ) ; 
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ E N A B L E D ,   1 1 0 ,   " S e l e c t   a l l " ) ; 
 
         _ m e n u . A p p e n d M e n u I t e m ( M F _ E N A B L E D ,   1 2 0 ,   " C l e a r   a l l " ) ; 
 
 
 
         i f   ( t m p _ o u t p u t _ i t e m _ n a m e _ a r r a y . l e n g t h   >   l i n e s )   { 
 
                 _ m e n u . A p p e n d M e n u I t e m ( M F _ S E P A R A T O R ,   0 ,   0 ) ; 
 
                 _ m e n u . A p p e n d M e n u I t e m ( s h i f t   = =   0   ?   M F _ G R A Y E D   :   M F _ E N A B L E D ,   1 3 0 ,   " U p " ) ; 
 
                 _ m e n u . A p p e n d M e n u I t e m ( s h i f t   +   l i n e s   > =   t m p _ o u t p u t _ i t e m _ n a m e _ a r r a y . l e n g t h   ?   M F _ G R A Y E D   :   M F _ E N A B L E D ,   1 4 0 ,   " D o w n " ) ; 
 
         } 
 
 
 
         r e t   =   _ m e n u . T r a c k P o p u p M e n u ( x   +   2 0 ,   y   -   2 5 0 ) ; 
 
 
 
         s w i t c h   ( t r u e )   { 
 
         c a s e   ( r e t   = =   1 ) : 
 
                 c r e a t e _ o u t p u t _ a r r a y ( ) ; 
 
                 b r e a k ; 
 
         c a s e   ( r e t   > =   2   & &   r e t   < =   t m p _ o u t p u t _ i t e m _ n a m e _ a r r a y . l e n g t h   +   1 ) : 
 
                 s e l e c t e d   =   w i n d o w . G e t P r o p e r t y ( r e t   -   1   +   s h i f t ) ; 
 
                 w i n d o w . S e t P r o p e r t y ( r e t   -   1   +   s h i f t ,   s e l e c t e d   = =   f a l s e   ?   t r u e   :   f a l s e ) ; 
 
                 m e n u _ c r e a t e _ f i l e ( x , y ) ; 
 
                 b r e a k ; 
 
         c a s e   ( r e t   = =   1 0 0 ) : 
 
                 w i n d o w . S e t P r o p e r t y ( " e x t " ,   0 ) ; 
 
                 m e n u _ c r e a t e _ f i l e ( x , y ) ; 
 
                 b r e a k ; 
 
         c a s e   ( r e t   = =   1 0 1 ) : 
 
                 w i n d o w . S e t P r o p e r t y ( " e x t " ,   1 ) ; 
 
                 m e n u _ c r e a t e _ f i l e ( x , y ) ; 
 
                 b r e a k ; 
 
         c a s e   ( r e t   = =   1 1 0 ) : 
 
                 f o r   ( v a r   j   =   1 ;   j   <   t m p _ o u t p u t _ i t e m _ n a m e _ a r r a y . l e n g t h   +   1 ;   j + + )   {       
 
                         w i n d o w . S e t P r o p e r t y ( j ,   t r u e ) ; 
 
                 } 
 
                 m e n u _ c r e a t e _ f i l e ( x , y ) ; 
 
                 b r e a k ; 
 
         c a s e   ( r e t   = =   1 2 0 ) : 
 
                 f o r   ( v a r   j   =   1 ;   j   <   t m p _ o u t p u t _ i t e m _ n a m e _ a r r a y . l e n g t h   +   1 ;   j + + )   {       
 
                         w i n d o w . S e t P r o p e r t y ( j ,   f a l s e ) ; 
 
                 } 
 
                 m e n u _ c r e a t e _ f i l e ( x , y ) ; 
 
                 b r e a k ; 
 
         c a s e   ( r e t   = =   1 3 0 ) : 
 
                 s h i f t   =   s h i f t   -   1 ; 
 
                 m e n u _ c r e a t e _ f i l e ( x , y ) ; 
 
                 b r e a k ; 
 
         c a s e   ( r e t   = =   1 4 0 ) : 
 
                 s h i f t   =   s h i f t   +   1 ; 
 
                 m e n u _ c r e a t e _ f i l e ( x , y ) ; 
 
                 b r e a k ; 
 
       } 
 
       _ m e n u . D i s p o s e ( ) ; 
 
 } 
 
 
 
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / /     C o p y   t o   c l i p b o a r d 
 
 
 
 f u n c t i o n   i n i _ s e l e c t e d _ i d x ( n ) { 
 
         f o r   ( j   =   0 ;   j   <   i t e m _ n a m e _ a r r a y _ 0 . l e n g t h ;   j + + )   { 
 
                 s e l e c t e d _ i d x [ j ]   =   n ; 
 
         } 
 
 } 
 
 
 
 f u n c t i o n   c o p y _ t o _ c l i p b o a r d ( ) { 
 
         v a r   c l i p b o a r d _ t e x t   =   " " ; 
 
 
 
         f o r   ( v a r   i   =   0 ;   i   <   i t e m _ n a m e _ a r r a y _ 0 . l e n g t h ;   i + + )   { 
 
               
 
                 i f   ( s e l e c t e d _ i d x [ i ]   >   0 ) { 
 
                         g r o u p   =   i t e m _ n a m e _ a r r a y _ 0 [ i ] . s e a r c h ( ' g r o u p ' )   > =   0   ?   t r u e   :   f a l s e ; 
 
               
 
                         i f   ( ! g r o u p ) { 
 
                                 n a m e   =   l a n g   = =   0   ?   c l e a r _ i t e m _ n a m e ( i t e m _ n a m e _ a r r a y _ 0 [ i ] )   :   i t e m _ n a m e _ a r r a y _ 1 [ i ] ; 
 
                                 v a l u e   =   i t e m _ v a l u e _ a r r a y [ i ] ; 
 
                               
 
                                 n a m e   =   c l i p b o a r d _ i t e m _ n a m e   ?   n a m e   +   " \ t "   :   " " ; 
 
 
 
                                 c l i p b o a r d _ t e x t   =   c l i p b o a r d _ t e x t   +   n a m e   +   v a l u e   +   ( i   <   i t e m _ n a m e _ a r r a y _ 0 . l e n g t h   -   1   ?   " \ r \ n "   :   " " ) ; 
 
                         } 
 
                 } 
 
         } 
 
 
 
         h t m l f i l e . p a r e n t W i n d o w . c l i p b o a r d D a t a . s e t D a t a ( " t e x t " ,   c l i p b o a r d _ t e x t ) ; 
 
         w i n d o w . R e p a i n t ( ) ; 
 
 } 
 
 
 
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / /     D r a w   s t a r 
 
 
 
 f u n c t i o n   d r a w _ s t a r ( g r ,   x ,   y ,   i m g _ s i z e ,   f i l l ,   l i n e _ t h i c k n e s s ,   c o l o r ,   s h ,   s h _ c o l o r ,   a l p h a ) { 
 
         v a r   r a d i u s   =   i m g _ s i z e   /   2 ; 
 
         v a r   r a d i u s _ 2   =   r a d i u s   /   2 . 6 1 8 0 3 ; 
 
         l i n e _ t h i c k n e s s   =   l i n e _ t h i c k n e s s   > =   r a d i u s _ 2   ?   r a d i u s _ 2   :   l i n e _ t h i c k n e s s ; 
 
         v a r   d e l t a   =   l i n e _ t h i c k n e s s   /   2   *   M a t h . t a n ( 7 2   /   1 8 0   *   M a t h . P I ) ; 
 
 
 
         v a r   p o i n t s   =   [ ] ,   s h _ p o i n t s   =   [ ] ; 
 
         v a r   x _ p o i n t s _ 1   =   [ ] ,   y _ p o i n t s _ 1   =   [ ] ,   x _ p o i n t s _ 2   =   [ ] ,   y _ p o i n t s _ 2   =   [ ] ; 
 
 
 
         f o r   ( v a r   i   =   0 ;   i   <   1 0 ;   i + + )   { 
 
                 i f   ( i   %   2   = =   0 )   { 
 
                         x _ p o i n t s _ 1 . p u s h ( ( r a d i u s   -   d e l t a )   *   M a t h . c o s ( M a t h . P I   *   i   /   1 0   *   2   -   M a t h . P I   /   2 ) ) ; 
 
                         y _ p o i n t s _ 1 . p u s h ( ( r a d i u s   -   d e l t a )   *   M a t h . s i n ( M a t h . P I   *   i   /   1 0   *   2   -   M a t h . P I   /   2 ) ) ; 
 
                 }   e l s e   { 
 
                         x _ p o i n t s _ 2 . p u s h ( ( r a d i u s   -   d e l t a )   /   2 . 6 1 8 0 3   *   M a t h . c o s ( M a t h . P I   *   i   /   1 0   *   2   -   M a t h . P I   /   2 ) ) ; 
 
                         y _ p o i n t s _ 2 . p u s h ( ( r a d i u s   -   d e l t a )   /   2 . 6 1 8 0 3   *   M a t h . s i n ( M a t h . P I   *   i   /   1 0   *   2   -   M a t h . P I   /   2 ) ) ; 
 
                 } 
 
         } 
 
               
 
         f o r   ( v a r   i   =   0 ;   i   <   5 ;   i + + )   { 
 
                 p o i n t s . p u s h ( x _ p o i n t s _ 1 [ i ]   +   r a d i u s ,   y _ p o i n t s _ 1 [ i ]   +   r a d i u s ,   x _ p o i n t s _ 2 [ i ]   +   r a d i u s ,   y _ p o i n t s _ 2 [ i ]   +   r a d i u s ) ; 
 
                 s h _ p o i n t s . p u s h ( x _ p o i n t s _ 1 [ i ]   +   r a d i u s   +   1 ,   y _ p o i n t s _ 1 [ i ]   +   r a d i u s   +   1 ,   x _ p o i n t s _ 2 [ i ]   +   r a d i u s   +   1 ,   y _ p o i n t s _ 2 [ i ]   +   r a d i u s   +   1 ) ; 
 
         } 
 
 
 
         v a r   i m g   =   g d i . C r e a t e I m a g e ( i m g _ s i z e ,   i m g _ s i z e ) ; 
 
         v a r   t e m p _ g r   =   i m g . G e t G r a p h i c s ( ) ; 
 
         t e m p _ g r . S e t S m o o t h i n g M o d e ( 2 ) ; 
 
       
 
         i f   ( l i n e _ t h i c k n e s s   >   0 )   { 
 
                 s h   & &   t e m p _ g r . D r a w P o l y g o n ( s h _ c o l o r ,   l i n e _ t h i c k n e s s ,   s h _ p o i n t s ) ; 
 
                 t e m p _ g r . D r a w P o l y g o n ( c o l o r ,   l i n e _ t h i c k n e s s ,   p o i n t s ) ; 
 
         } 
 
 
 
         i f   ( f i l l   & &   l i n e _ t h i c k n e s s   = =   0 )   { 
 
                 s h   & &   t e m p _ g r . F i l l P o l y g o n ( s h _ c o l o r ,   1 ,   s h _ p o i n t s ) ; 
 
                 t e m p _ g r . F i l l P o l y g o n ( c o l o r ,   1 ,   p o i n t s ) 
 
         } 
 
 
 
         g r . D r a w I m a g e ( i m g ,   x   -   r a d i u s ,   y   -   r a d i u s ,   i m g _ s i z e ,   i m g _ s i z e ,   0 ,   0 ,   i m g _ s i z e ,   i m g _ s i z e ,   0 ,   a l p h a ) ; 
 
       
 
         i m g . R e l e a s e G r a p h i c s ( t e m p _ g r ) ; 
 
         i m g . D i s p o s e ( ) ; 
 
         t e m p _ g r   =   n u l l ; 
 
         i m g   =   n u l l ; 
 
 } 
 
 
 
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / /     w s h   t o o l t i p   ( c u s t o m   p a i n t ) 
 
 
 
 f u n c t i o n   a c t i v e _ t o o l t i p ( ) {             
 
         i f   ( ! t o o l t i p _ s t a t e ) {             
 
                 t o o l t i p _ s t a t e   =   t r u e ;       
 
                 t o o l t i p . A c t i v a t e ( ) ;             
 
                 t o o l t i p . T r a c k A c t i v a t e   =   t r u e ;       
 
         }             
 
 }             
 
             
 
 f u n c t i o n   d e a c t i v e _ t o o l t i p ( ) {   
 
         t o o l t i p _ t i m e . R e s e t ( ) ;         
 
         i f   ( t o o l t i p _ s t a t e ) {       
 
                 t o o l t i p . D e a c t i v a t e ( ) ; 
 
                 t o o l t i p . T r a c k A c t i v a t e   =   f a l s e ;       
 
                 t o o l t i p _ s t a t e   =   f a l s e ;       
 
         }             
 
 }             
 
 
 
 f u n c t i o n   o n _ t o o l t i p _ c u s t o m _ p a i n t ( g r ) { 
 
         f o r   ( v a r   i   =   0 ;   i   <   t o o l t i p _ t . l e n g t h ;   i   + =   1 )   { 
 
                 g r . G d i D r a w T e x t (   t o o l t i p _ t [ i ] ,   f o n t _ t o o l t i p ,   R G B ( 0 ,   0 ,   0 ) ,   5 ,   t o o l t i p _ t _ h   *   i   +   2 ,   t o o l t i p . W i d t h ,   t o o l t i p . H e i g h t ,   D T _ L E F T   |   D T _ W O R D B R E A K   |   D T _ N O P R E F I X   ) ;   
 
         } 
 
 }       
 
 
 
 f u n c t i o n   t o o l t i p _ a c t i v a t e _ w s h ( x ,   y )   { 
 
         t o o l t i p _ x   =   t _ x 2   -   5 ; 
 
         t o o l t i p _ y   =   i d x   *   l i n e _ h e i g h t   -   M a t h . a b s ( s c r o l l ) ; 
 
         
 
         v a r   v a l u e _ w i d t h   =   c a l c _ t e x t _ d a t a (   " w " ,   i t e m _ v a l u e _ a r r a y [ i d x ] ,   f o n t _ i t e m _ v a l u e   ) ; 
 
 
 
         i f   ( v a l u e _ w i d t h   >   w w   -   t _ x 2   -   t _ x 1   & &   x   >   t _ x 2   & &   x   <   w w   -   t _ x 1   & &   y   >   t o o l t i p _ y   +   1   & &   y   <   t o o l t i p _ y   +   l i n e _ h e i g h t   -   1 ) { 
 
                 i f   ( t o o l t i p _ t i m e . T i m e   >   t o o l t i p _ d e l a y _ t i m e   & &   ! t o o l t i p _ s t a t e )   { 
 
                         t o o l t i p _ t e x t   =   i t e m _ v a l u e _ a r r a y [ i d x ] ; 
 
                         c a l c _ t o o l t i p _ d i m ( ) ; 
 
                         t o o l t i p . T r a c k P o s i t i o n (   t o o l t i p _ x ,   t o o l t i p _ y   +   w i n d o w . G e t P r o p e r t y ( "   v e r t i c a l   i t e m   p a d d i n g " )   /   2 ) ; 
 
                         a c t i v e _ t o o l t i p ( ) ; 
 
                         t o o l t i p . T e x t   =   "   " ;       
 
                 }               
 
         }   e l s e   {       
 
                 d e a c t i v e _ t o o l t i p ( ) ;       
 
         } 
 
 } 
 
 
 
 f u n c t i o n   c a l c _ t o o l t i p _ d i m ( ) { 
 
         t o o l t i p _ t _ w   =   c a l c _ t e x t _ d a t a (   " w " ,   t o o l t i p _ t e x t ,   f o n t _ t o o l t i p   ) ;       
 
         t o o l t i p _ t _ h   =   c a l c _ t e x t _ d a t a (   " h " ,   t o o l t i p _ t e x t ,   f o n t _ t o o l t i p   ) ; 
 
         t o o l t i p _ t _ t m p   =   c a l c _ t e x t _ d a t a (   " a " ,   t o o l t i p _ t e x t ,   f o n t _ t o o l t i p ,   t o o l t i p _ m a x _ w   ) ; 
 
       
 
         t o o l t i p _ t   =   [ ] ; 
 
         t o o l t i p _ l   =   [ ] ; 
 
 
 
         f o r   ( v a r   i   =   0 ;   i   <   t o o l t i p _ t _ t m p . l e n g t h ;   i   + =   1 )   { 
 
                 i f   ( i   %   2   = =   0 )   { 
 
                         t o o l t i p _ t . p u s h ( t o o l t i p _ t _ t m p [ i ] . r e p l a c e ( / ^ \ s + | \ s + $ / g ,   " " ) ) ; 
 
                 }   e l s e   { 
 
                         t o o l t i p _ l . p u s h ( t o o l t i p _ t _ t m p [ i ] ) ; 
 
                 } 
 
         } 
 
       
 
         i f   ( t o o l t i p _ t _ w   < =   t o o l t i p _ m a x _ w ) { 
 
                 t o o l t i p . W i d t h   =   t o o l t i p _ t _ w   +   0 ; 
 
                 t o o l t i p . H e i g h t   =   t o o l t i p _ t _ h ; 
 
         }   e l s e   { 
 
                 t o o l t i p . W i d t h   =   M a t h . m a x . a p p l y ( n u l l ,   t o o l t i p _ l )   +   0 ; 
 
                 t o o l t i p . H e i g h t   =   t o o l t i p _ t _ h   *   t o o l t i p _ t . l e n g t h ; 
 
         } 
 
 }       
 
 
 
 f u n c t i o n   c a l c _ t e x t _ d a t a ( d ,   t e x t ,   f o n t ,   m a x _ w )   { 
 
         v a r   t e m p _ b m p   =   g d i . C r e a t e I m a g e ( 1 ,   1 ) ; 
 
         v a r   t e m p _ g r   =   t e m p _ b m p . G e t G r a p h i c s ( ) ; 
 
         v a r   t m p ; 
 
       
 
         s w i t c h   ( d )   { 
 
         c a s e   " w " : 
 
                 t m p   =   t e m p _ g r . C a l c T e x t W i d t h ( t e x t ,   f o n t ) ; 
 
                 b r e a k ; 
 
         c a s e   " h " : 
 
                 t m p   =   t e m p _ g r . C a l c T e x t H e i g h t ( t e x t ,   f o n t ) ; 
 
                 b r e a k ; 
 
         c a s e   " a " : 
 
                 t m p   =   t e m p _ g r . E s t i m a t e L i n e W r a p ( t e x t ,   f o n t ,   m a x _ w ) . t o A r r a y ( ) ; 
 
                 b r e a k ; 
 
         } 
 
       
 
         t e m p _ b m p . R e l e a s e G r a p h i c s ( t e m p _ g r ) ; 
 
         t e m p _ b m p . D i s p o s e ( ) ; 
 
         t e m p _ g r   =   n u l l ; 
 
         t e m p _ b m p   =   n u l l ; 
 
         r e t u r n   t m p ; 
 
 } 
 
 
 
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / /     j s c r i p t   t o o l t i p 
 
 
 
 f u n c t i o n   t o o l t i p _ a c t i v a t e _ j s c r i p t ( x ,   y )   { 
 
         t o o l t i p _ x   =   t _ x 2   -   5 ; 
 
         t o o l t i p _ y   =   i d x   *   l i n e _ h e i g h t   -   M a t h . a b s ( s c r o l l ) ; 
 
 
 
         v a r   v a l u e _ w i d t h   =   c a l c _ t e x t _ d a t a ( " w " ,     i t e m _ v a l u e _ a r r a y [ i d x ] ,   f o n t _ i t e m _ v a l u e ) 
 
       
 
         i f   ( v a l u e _ w i d t h   >   w w   -   t _ x 2   -   t _ x 1   & &   x   >   t _ x 2   & &   x   <   w w   -   t _ x 1   & &   y   >   t o o l t i p _ y   +   1   & &   y   <   t o o l t i p _ y   +   l i n e _ h e i g h t   -   1 ) { 
 
                 i f   ( t o o l t i p _ t i m e . T i m e   >   t o o l t i p _ d e l a y _ t i m e )   { 
 
                         t o o l t i p . T e x t   =   i t e m _ v a l u e _ a r r a y [ i d x ] ; 
 
                         t o o l t i p . T r a c k P o s i t i o n (   t o o l t i p _ x ,   t o o l t i p _ y   +   w i n d o w . G e t P r o p e r t y ( "   v e r t i c a l   i t e m   p a d d i n g " )   /   2 ) ; 
 
                         t o o l t i p . T r a c k A c t i v a t e   =   t r u e ; 
 
                         t o o l t i p . A c t i v a t e ( ) ; 
 
                         t o o l t i p _ s t a t e   =   t r u e ;       
 
                 } 
 
         }   e l s e   { 
 
                 d e a c t i v e _ t o o l t i p ( ) ;   
 
         } 
 
 } 
 
 
 
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / /     l a s t F M   d a t a 
 
 
 
 f u n c t i o n   g e t _ l a s t F M _ s i m i l a r ( a ) { 
 
         i f   ( ! a )   r e t u r n 
 
         v a r   x m l h t t p 0   =   n e w   A c t i v e X O b j e c t ( " M i c r o s o f t . X M L H T T P " ) ;       
 
         v a r   u r l 0   =   ( " h t t p s : / / w w w . l a s t . f m / m u s i c / "   +   e n c o d e U R I C o m p o n e n t ( a )   +   " / + s i m i l a r " ) ; 
 
         x m l h t t p 0 . o p e n ( " G E T " ,   u r l 0 ,   t r u e   ) ;   
 
         x m l h t t p 0 . s e t R e q u e s t H e a d e r ( " I f - M o d i f i e d - S i n c e " ,   " S a t ,   1   J a n   2 0 0 0   0 0 : 0 0 : 0 0   G M T " ) ; 
 
         x m l h t t p 0 . s e n d ( n u l l ) ;           
 
         x m l h t t p 0 . o n r e a d y s t a t e c h a n g e   =   f u n c t i o n   ( )   { 
 
                 i f   ( x m l h t t p 0 . r e a d y S t a t e   = =   4 )   { 
 
                         i f   ( x m l h t t p 0 . s t a t u s   = =   2 0 0 )   {   
 
                                 d o c . o p e n ( ) ;           
 
                                 v a r   d i v   =   d o c . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                 d i v . i n n e r H T M L   =   x m l h t t p 0 . r e s p o n s e t e x t ; 
 
                                 v a r   a   =   d i v . g e t E l e m e n t s B y T a g N a m e ( " a " ) ; 
 
                               
 
                                 v a r   t m p   =   [ ] ; 
 
                                 v a r   j   =   0 ; 
 
                           
 
                                 f o r   ( i   =   0 ;   i   <   a . l e n g t h ;   i + + )   {   
 
                                         i f   ( a [ i ] . c l a s s N a m e   = =   " l i n k - b l o c k - t a r g e t " ) { 
 
                                                 t m p [ j ]   =   a [ i ] . i n n e r H T M L . r e p l a c e ( / ( & a m p ; ) / g , ' & ' ) ; 
 
                                                 j + + 
 
                                                 i f   ( j   = =   6 )   b r e a k ; 
 
                                         } 
 
                                 } 
 
                                 d o c . c l o s e ( ) ; 
 
                                 s i m i l a r   =   t m p . j o i n ( " ; " ) ; 
 
                                 c r e a t e _ a r r a y ( ) ; 
 
                         } 
 
                 } 
 
         }           
 
 } 
 
 
 
 f u n c t i o n   g e t _ l a s t F M _ a r t i s t _ i n f o ( a ) { 
 
         i f   ( ! a )   r e t u r n 
 
         v a r   x m l h t t p 1   =   n e w   A c t i v e X O b j e c t ( " M i c r o s o f t . X M L H T T P " ) ;       
 
         v a r   u r l 1   =   ( " h t t p s : / / w w w . l a s t . f m / m u s i c / "   +   e n c o d e U R I C o m p o n e n t ( a ) ) ;   
 
         x m l h t t p 1 . o p e n ( " G E T " ,   u r l 1 ,   t r u e   ) ;   
 
         x m l h t t p 1 . s e t R e q u e s t H e a d e r ( " I f - M o d i f i e d - S i n c e " ,   " S a t ,   1   J a n   2 0 0 0   0 0 : 0 0 : 0 0   G M T " ) ; 
 
         x m l h t t p 1 . s e n d ( n u l l ) ;           
 
         x m l h t t p 1 . o n r e a d y s t a t e c h a n g e   =   f u n c t i o n   ( )   { 
 
                 i f   ( x m l h t t p 1 . r e a d y S t a t e   = =   4 )   { 
 
                         i f   ( x m l h t t p 1 . s t a t u s   = =   2 0 0 )   {   
 
                                 d o c . o p e n ( ) ;           
 
                                 v a r   d i v   =   d o c . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                 d i v . i n n e r H T M L   =   x m l h t t p 1 . r e s p o n s e t e x t ; 
 
                                 v a r   a b b r   =   d i v . g e t E l e m e n t s B y T a g N a m e ( " a b b r " ) ; 
 
                               
 
                                 f o r   ( i   =   0 ;   i   <   a b b r . l e n g t h ;   i + + )   {   
 
                                         i f   ( a b b r [ i ] . c l a s s N a m e   = =   " i n t a b b r " ) { 
 
                                                 a r t i s t _ i n f o . p u s h ( a b b r [ i ] . t i t l e . r e p l a c e ( / \ , / g ,   "   " ) ) ; 
 
                                         } 
 
                                 } 
 
                                 d o c . c l o s e ( ) ; 
 
                                 c r e a t e _ a r r a y ( ) ; 
 
                         } 
 
                 } 
 
         }           
 
 } 
 
 
 
 f u n c t i o n   g e t _ l a s t F M _ a l b u m _ i n f o ( a ,   a l ) { 
 
         i f   ( ! a   | |   ! a l )   r e t u r n 
 
         v a r   x m l h t t p 2   =   n e w   A c t i v e X O b j e c t ( " M i c r o s o f t . X M L H T T P " ) ;       
 
         v a r   u r l 2   =   ( " h t t p s : / / w w w . l a s t . f m / m u s i c / "   +   e n c o d e U R I C o m p o n e n t ( a )   +   " / "   +   e n c o d e U R I C o m p o n e n t ( a l ) ) ;   
 
         x m l h t t p 2 . o p e n ( " G E T " ,   u r l 2 ,   t r u e   ) ;   
 
         x m l h t t p 2 . s e t R e q u e s t H e a d e r ( " I f - M o d i f i e d - S i n c e " ,   " S a t ,   1   J a n   2 0 0 0   0 0 : 0 0 : 0 0   G M T " ) ; 
 
         x m l h t t p 2 . s e n d ( n u l l ) ;           
 
         x m l h t t p 2 . o n r e a d y s t a t e c h a n g e   =   f u n c t i o n   ( )   { 
 
                 i f   ( x m l h t t p 2 . r e a d y S t a t e   = =   4 )   { 
 
                         i f   ( x m l h t t p 2 . s t a t u s   = =   2 0 0 )   {   
 
                                 d o c . o p e n ( ) ;           
 
                                 v a r   d i v   =   d o c . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                 d i v . i n n e r H T M L   =   x m l h t t p 2 . r e s p o n s e t e x t ; 
 
                                 v a r   a b b r   =   d i v . g e t E l e m e n t s B y T a g N a m e ( " a b b r " ) ; 
 
                               
 
                                 f o r   ( i   =   0 ;   i   <   a b b r . l e n g t h ;   i + + )   {   
 
                                         i f   ( a b b r [ i ] . c l a s s N a m e   = =   " i n t a b b r " ) { 
 
                                                 a l b u m _ i n f o . p u s h ( a b b r [ i ] . t i t l e . r e p l a c e ( / \ , / g ,   "   " ) ) ; 
 
                                         } 
 
                                 } 
 
                                 d o c . c l o s e ( ) ; 
 
                                 c r e a t e _ a r r a y ( ) ; 
 
                         } 
 
                 } 
 
         }   
 
 } 
 
 
 
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / /     c o l o r 
 
 
 
 f u n c t i o n   R G B t o H S V ( r ,   g ,   b )   { 
 
         v a r   H S V   =   { H :   0 ,   S :   0 ,   V :   0 } ;     
 
         v a r   r   =   ( r   /   2 5 5 ) ;    
 
         v a r   g   =   ( g   /   2 5 5 ) ; 
 
         v a r   b   =   ( b   /   2 5 5 ) ; 
 
 
 
         v a r   m i n   =   M a t h . m i n (   r ,   g ,   b  ) ;      
 
         v a r   m a x   =   M a t h . m a x (   r ,   g ,   b  ) ;     
 
         v a r   d e l t a   =   m a x   -   m i n ;               
 
 
 
         v   =   m a x ; 
 
 
 
         i f   ( d e l t a   = =  0 )   { 
 
                 h  =   0 ;                             
 
                 s  =   0 ; 
 
         }   e l s e   { 
 
                 s   =   d e l t a   /   m a x ; 
 
 
 
                 d e l t a _ r   =   ( ( ( m a x  -   r )   /   6 )   +   ( d e l t a   /   2 ) )   /   d e l t a ; 
 
                 d e l t a _ g   =   ( ( ( m a x  -   g )   /   6 )   +   ( d e l t a   /   2 ) )   /   d e l t a ; 
 
                 d e l t a _ b   =   ( ( ( m a x  -   b )   /   6 )   +   ( d e l t a   /   2 ) )   /   d e l t a ; 
 
 
 
                 i f        ( r  = =   m a x )   h  =   d e l t a _ b   -   d e l t a _ g ; 
 
                 e l s e   i f   ( g  = =   m a x )  h  =   ( 1   /   3 )   +   d e l t a _ r   -   d e l t a _ b ; 
 
                 e l s e   i f   ( b  = =   m a x )  h  =   ( 2   /   3 )   +   d e l t a _ g   -   d e l t a _ r ; 
 
 
 
                 i f   (   h  <   0   )   h  + =   1 ; 
 
                 i f   (   h  >   1   )   h  - =   1 ; 
 
         } 
 
         
 
         H S V . H   =   M a t h . r o u n d ( h   *   3 6 0 ) ;                                             
 
         H S V . S   =   M a t h . r o u n d ( s   *   1 0 0 ) ; 
 
         H S V . V   =   M a t h . r o u n d ( v   *   1 0 0 ) ; 
 
         r e t u r n   H S V ; 
 
 }   
 
 
 
 f u n c t i o n   H S V t o R G B ( h ,   s ,   v )   { 
 
         v a r   h   =   h   /   3 6 0 ; 
 
         v a r   s   =   s   /   1 0 0 ; 
 
         v a r   v   =   v   /   1 0 0 ; 
 
         
 
         i f   ( s  = =   0 )   { 
 
                 v a r   r   =   v   *   2 5 5 ; 
 
                 v a r   g   =   v   *   2 5 5 ; 
 
                 v a r   b   =   v   *   2 5 5 ; 
 
         }   e l s e   { 
 
                 h   =   h   *   6 ; 
 
                 i f   (   h   = =   6  )   h   =   0 ; 
 
 
 
                 v a r   v a r _ i   =   M a t h . f l o o r (   h  ) ; 
 
                 v a r   v a r _ 1   =   v   *   ( 1   -   s ) ; 
 
                 v a r   v a r _ 2   =   v  *   ( 1   -   s  *   ( h   -   v a r _ i ) ) ; 
 
                 v a r   v a r _ 3   =   v  *   ( 1   -   s  *   ( 1   -   ( h   -   v a r _ i ) ) ) ; 
 
 
 
                 i f        ( v a r _ i   = =   0 )   { r   =   v ;           g   =   v a r _ 3 ;   b   =   v a r _ 1 } 
 
                 e l s e   i f   ( v a r _ i   = =   1 )   { r   =   v a r _ 2 ;   g   =   v ;           b   =   v a r _ 1 } 
 
                 e l s e   i f   ( v a r _ i   = =   2 )   { r   =   v a r _ 1 ;   g   =   v ;           b   =   v a r _ 3 } 
 
                 e l s e   i f   ( v a r _ i   = =   3 )   { r   =   v a r _ 1 ;   g   =   v a r _ 2 ;   b   =   v } 
 
                 e l s e   i f   ( v a r _ i   = =   4 )   { r   =   v a r _ 3 ;   g   =   v a r _ 1 ;   b   =   v } 
 
                 e l s e                                   { r   =   v ;           g   =   v a r _ 1 ;   b   =   v a r _ 2 } ; 
 
 
 
                 r   =   r   *   2 5 5 ;            
 
                 g   =   g   *   2 5 5 ; 
 
                 b   =   b   *   2 5 5 ; 
 
         } 
 
 	 r e t u r n   R G B (   M a t h . r o u n d ( r ) ,   M a t h . r o u n d ( g ) ,   M a t h . r o u n d ( b ) ) ; 
 
 } 
 
 
 
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / /     t e x t   s c r o l l 
 
 
 
 f u n c t i o n   s c r o l l _ c h e c k ( ) { 
 
         i f   ( s c r o l l   > =   0 ) { 	 
 
                 s c r o l l   =   0 ; 
 
         }   e l s e   i f   ( M a t h . a b s ( s c r o l l )   +   p a n e l _ h e i g h t   > =   t e x t _ h e i g h t ) { 
 
                 s c r o l l   =   ( t e x t _ h e i g h t   -   p a n e l _ h e i g h t )   *   - 1 ;   
 
         } 
 
         
 
         ! s c r o l l _ t i m e r _ o n   & &   s c r o l l _ t i m e r ( ) ; 
 
 } 
 
 
 
 f u n c t i o n   s c r o l l _ t i m e r ( ) { 
 
         s c r o l l _ t i m e r _ o n   =   t r u e ; 
 
         t i m e r   & &   w i n d o w . C l e a r I n t e r v a l ( t i m e r ) ; 
 
         t i m e r   =   w i n d o w . S e t I n t e r v a l ( f u n c t i o n ( )   { 
 
                 i f   ( M a t h . a b s ( s c r o l l   -   s c r o l l _ )   >   0 . 1 ) { 	 
 
                         k   =   l b t n _ d o w n   & &   m o v e _ y   & &   ! c o n t r o l _ d o w n   ?   1 . 2   :   3 ; 
 
 
 
                         s c r o l l _ _ _   + =   ( s c r o l l   -   s c r o l l _ _ _ )   /   k ; 	 	 	 
 
                         s c r o l l _ _   + =   ( s c r o l l _ _ _   -   s c r o l l _ _ )   /   k ; 	 	 	 
 
                         s c r o l l _   + =   ( s c r o l l _ _   -   s c r o l l _ )   /   k ; 
 
                 }   e l s e   { 
 
                         w i n d o w . C l e a r I n t e r v a l ( t i m e r ) ; 
 
                         s c r o l l _   =   s c r o l l ; 
 
                         s c r o l l _ t i m e r _ o n   =   f a l s e ; 
 
                 } 
 
                 w i n d o w . R e p a i n t ( ) ; 
 
         } ,   4 0 ) ;                   
 
 } 
 
 
 
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 
 
 
 
 f u n c t i o n   o n _ n o t i f y _ d a t a ( n a m e ,   i n f o )   { 
 
         i f   ( n a m e   = =   " p a n e l   p r o p e r t i e s " )   { 
 
                 i f   ( i n f o   = =   " p r o p e r t i e s " ) { 
 
                         p a n e l _ o n   =   t r u e ; 
 
                         o l d _ a r t i s t   =   " " ; 
 
                         o l d _ a l b u m   =   " " ; 
 
                         o n _ m e t a d b _ c h a n g e d ( ) ; 
 
                 }   e l s e   { 
 
                         p a n e l _ o n   =   f a l s e ; 
 
                 } 
 
         } 
 
 } 
 
   
 
 